chore: src/modules/base/entity/sys/department.ts

This commit is contained in:
2026-07-01 17:55:57 +08:00
parent 2a2d18a648
commit cf1a6739fb
+23
View File
@@ -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;
}