import { Column, Entity } from 'typeorm'; import { BaseModel } from '../../frame/BaseModel'; // interface config { // comment: '中文'; // code: '页面功能编码'; // controller_code: '接口函数名路径'; // } @Entity('menus') export class Menus extends BaseModel { @Column({ type: 'character varying', comment: '菜单名称' }) name: string; @Column({ type: 'character varying', comment: '路由名称 英文' }) route_name: string; @Column({ type: 'character varying', comment: '国际化编码' }) i18n_code: string; @Column({ type: 'integer', nullable: true, comment: '父级菜单' }) parent_id: number; @Column({ type: 'integer', nullable: true, comment: '显示顺序' }) order_num: number; @Column({ type: 'character varying', nullable: true, comment: '路由地址' }) path: string; @Column({ type: 'character varying', nullable: true, comment: '组件地址' }) component: string; @Column({ type: 'character varying', comment: '菜单类型 0:目录;1:菜单;2:子页面' }) type: string; @Column({ type: 'character varying', nullable: true, comment: '图标' }) icon: string; @Column({ type: 'jsonb', nullable: true, comment: '功能列表 不在功能列表中的功能不能使用' }) config: Array; @Column({ type: 'character varying', comment: '是否为默认菜单 默认:0,非默认:1; 默认不能删除', default: '1' }) is_default: string; @Column({ type: 'text', nullable: true, comment: '备注' }) remark: string; @Column({ type: 'character varying', comment: '是否启用', default: '0' }) is_use: string; }