achievement.entity.ts 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { Column, Entity } from 'typeorm';
  2. import { BaseModel } from '../../frame/BaseModel';
  3. import * as dayjs from 'dayjs';
  4. // 成果需要与用户连接,否则就只能属于平台的了
  5. // 成果
  6. @Entity('achievement')
  7. export class Achievement extends BaseModel {
  8. @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
  9. user: number;
  10. @Column({ type: 'character varying', nullable: true, comment: '所属产业' })
  11. industry: string;
  12. @Column({ type: 'jsonb', nullable: true, comment: '标签', default: [] })
  13. tags: Array<any>;
  14. @Column({ type: 'character varying', nullable: true, comment: '专利号' })
  15. patent: string;
  16. @Column({ type: 'character varying', nullable: true, comment: '名称' })
  17. name: string;
  18. @Column({ type: 'character varying', nullable: true, comment: '属性' })
  19. attribute: string;
  20. @Column({ type: 'character varying', nullable: true, comment: '出让方式' })
  21. sell: string;
  22. @Column({ type: 'character varying', nullable: true, comment: '成熟度' })
  23. mature: string;
  24. @Column({ type: 'character varying', nullable: true, comment: '行业领域' })
  25. field: string;
  26. @Column({ type: 'character varying', nullable: true, comment: '技术分类' })
  27. technology: string;
  28. @Column({ type: 'jsonb', nullable: true, comment: '成果地区', default: [] })
  29. area: Array<any>;
  30. @Column({ type: 'timestamp without time zone', nullable: true, comment: '发布时间', transformer: { from: value => dayjs(value).format('YYYY-MM-DD HH:mm:ss'), to: value => value } })
  31. time: Date;
  32. @Column({ type: 'character varying', nullable: true, comment: '参考价格' })
  33. money: string;
  34. @Column({ type: 'text', nullable: true, comment: '简介' })
  35. brief: string;
  36. @Column({ type: 'jsonb', nullable: true, comment: '附件', default: [] })
  37. file: Array<any>;
  38. @Column({ type: 'character varying', nullable: true, comment: '成果状态', default: '0' })
  39. achievement_status: string;
  40. @Column({ type: 'character varying', nullable: true, comment: '是否公开', default: '0' })
  41. is_use: string;
  42. @Column({ type: 'character varying', nullable: true, comment: '状态', default: '0' })
  43. status: string;
  44. @Column({ type: 'character varying', nullable: true, comment: '项目来源' })
  45. source: string;
  46. @Column({ type: 'character varying', nullable: true, comment: '负责人' })
  47. person: string;
  48. @Column({ type: 'character varying', nullable: true, comment: '联系电话' })
  49. tel: string;
  50. }