import { BaseEntity } from '@cool-midway/core';
import { Column, Entity } from 'typeorm';

/**
 * base-sys模块-工具
 */
@Entity('base_sys_tool')
export class BaseSysToolEntity extends BaseEntity {
  @Column({ comment: '父菜单ID', type: 'int', nullable: true })
  parentId: number;

  @Column({ comment: '名称', length: 50 })
  name: string;

  @Column({ comment: 'key', length: 50 })
  key: string;

  @Column({ comment: '组件', length: 50 })
  component: string;

  @Column({ comment: '自动禁用', default: false })
  autoDisable: boolean;

  @Column({ comment: '禁用其他', nullable: true })
  disableOther: string;

  @Column({ comment: '组', nullable: true })
  group: string;

  @Column({ comment: '可见', default: true })
  visible: boolean;

  @Column({ comment: '数据', nullable: true })
  data: string;

  @Column({ comment: '元', nullable: true })
  meta: string;

  @Column({ comment: '排序', default: 0 })
  orderNum: number;

  @Column({ comment: '图片', length: 50 })
  icon: string;
}
