region.entity.ts 689 B

12345678910111213141516
  1. import { Entity, Column } from 'typeorm';
  2. import { BaseModel } from '../../frame/BaseModel';
  3. @Entity('region', { comment: '地区数据' })
  4. export class Region extends BaseModel {
  5. @Column({ type: 'character varying', nullable: true, comment: '编码' })
  6. code: string;
  7. @Column({ type: 'character varying', nullable: true, comment: '名称' })
  8. name: string;
  9. @Column({ type: 'character varying', nullable: true, comment: '上级编码' })
  10. parent_code: string;
  11. @Column({ type: 'character varying', nullable: true, comment: '等级:province;city;area;street' })
  12. level: string;
  13. @Column({ type: 'character varying', comment: '是否启用', default: '0' })
  14. is_use: string;
  15. }