1234567891011121314151617181920 |
- import { Column, Entity } from 'typeorm';
- import { BaseModel } from '../../frame/BaseModel';
- @Entity('dept', { comment: '部门' })
- export class Dept extends BaseModel {
- @Column({ type: 'character varying', comment: '部门名称' })
- name: string;
- @Column({ type: 'jsonb', default: [], comment: '资源权限' })
- resource: Array<string>;
- @Column({ type: 'integer', nullable: true, comment: '上级部门id' })
- parent_id: number;
- @Column({ type: 'character varying', default: '0', comment: '是否使用 0使用;1禁用' })
- is_use: string;
- @Column({ type: 'character varying', default: '1', comment: '是否是总部门 0:是;1否' })
- is_super: string;
- @Column({ type: 'integer', nullable: true, comment: '排序' })
- order_num: number;
- @Column({ type: 'character varying', comment: '是否为默认目录 默认:0,非默认:1; 默认不能删除', default: '1' })
- is_default: string;
- }
|