wangzhibo
2026-07-16 bac4362a0b7726d38a23d38f0d7913f2c2bab262
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}