role.entity.ts 593 B

12345678910111213141516
  1. import { Column, Entity } from 'typeorm';
  2. import { BaseModel } from '../../frame/BaseModel';
  3. @Entity('role')
  4. export class Role extends BaseModel {
  5. @Column({ type: 'character varying', comment: '角色名称' })
  6. name: string;
  7. @Column({ type: 'character varying', comment: '角色编码' })
  8. code: string;
  9. @Column({ type: 'jsonb', default: [], comment: '菜单' })
  10. menu: Array<string>;
  11. @Column({ type: 'text', nullable: true, comment: '简介' })
  12. brief: string;
  13. @Column({ type: 'character varying', default: '0', comment: '是否使用 0使用;1禁用' })
  14. is_use: string;
  15. }