userMenus.entity.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { Column, Entity } from 'typeorm';
  2. import { BaseModel } from '../../frame/BaseModel';
  3. // interface config {
  4. // comment: '中文';
  5. // code: '页面功能编码';
  6. // controller_code: '接口函数名路径';
  7. // }
  8. // 菜单表
  9. @Entity('userMenus')
  10. export class UserMenus extends BaseModel {
  11. @Column({ type: 'character varying', comment: '目录名称' })
  12. name: string;
  13. @Column({ type: 'character varying', comment: '路由名称 英文' })
  14. route_name: string;
  15. @Column({ type: 'character varying', comment: '国际化编码' })
  16. i18n_code: string;
  17. @Column({ type: 'integer', nullable: true, comment: '父级目录' })
  18. parent_id: number;
  19. @Column({ type: 'integer', nullable: true, comment: '显示顺序' })
  20. order_num: number;
  21. @Column({ type: 'character varying', nullable: true, comment: '路由地址' })
  22. path: string;
  23. @Column({ type: 'character varying', nullable: true, comment: '组件地址' })
  24. component: string;
  25. @Column({ type: 'character varying', comment: '目录类型 0:目录;1:目录;2:子页面' })
  26. type: string;
  27. @Column({ type: 'character varying', nullable: true, comment: '图标' })
  28. icon: string;
  29. @Column({ type: 'jsonb', nullable: true, comment: '功能列表 不在功能列表中的功能不能使用', default: [] })
  30. config: Array<any>;
  31. @Column({ type: 'character varying', comment: '是否为默认目录 默认:0,非默认:1; 默认不能删除', default: '1' })
  32. is_default: string;
  33. @Column({ type: 'text', nullable: true, comment: '备注' })
  34. remark: string;
  35. @Column({ type: 'character varying', comment: '是否启用', default: '0' })
  36. is_use: string;
  37. }