From cf1a6739fbe7ca9fadcc25afb6a9b60e8d87cf96 Mon Sep 17 00:00:00 2001 From: snowgitea Date: Wed, 1 Jul 2026 17:55:57 +0800 Subject: [PATCH] chore: src/modules/base/entity/sys/department.ts --- src/modules/base/entity/sys/department.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/modules/base/entity/sys/department.ts diff --git a/src/modules/base/entity/sys/department.ts b/src/modules/base/entity/sys/department.ts new file mode 100644 index 0000000..ce38c5f --- /dev/null +++ b/src/modules/base/entity/sys/department.ts @@ -0,0 +1,23 @@ +import { BaseEntity } from '../base'; +import { Column, Entity, Index } from 'typeorm'; + +/** + * 部门 + */ +@Entity('base_sys_department') +export class BaseSysDepartmentEntity extends BaseEntity { + @Column({ comment: '部门名称' }) + name: string; + + @Index() + @Column({ comment: '创建者ID', nullable: true }) + userId: number; + + @Column({ comment: '上级部门ID', nullable: true }) + parentId: number; + + @Column({ comment: '排序', default: 0 }) + orderNum: number; + // 父菜单名称 + parentName: string; +}