import { Entity, Column } from 'typeorm'; import { BaseEntity } from '@cool-midway/core'; @Entity('config_data_field') export class DataFieldEntity extends BaseEntity { @Column({ comment: '字段名称' }) name: string; @Column({ comment: '字段描述' }) description: string; @Column({ comment: '字段类型 0:字符 1:日期 2:数值 3:空间数据', default: 0, }) type: number; @Column({ comment: '字段长度', nullable: true }) length: number; @Column({ comment: '字段单位', nullable: true }) unit: string; @Column({ comment: '是否显示 0:否 1:是', default: 1 }) isDisplay: number; @Column({ comment: '排序', nullable: true }) sortCode: number; @Column({ comment: '表ID', type: 'int', nullable: true }) tableId: number; }