rent_computer.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * @Author: YKH
  3. * @Date: 2022-09-01 20:41:58
  4. * @LastEditTime: 2022-09-26 17:06:22
  5. * @Description: file content
  6. * @FilePath: \cool-admin-3.x\cool-admin-midway-master\src\app\modules\shuyou\entity\rent_computer.ts
  7. */
  8. import { EntityModel } from '@midwayjs/orm';
  9. import { Column, Index } from 'typeorm';
  10. import { BaseEntity } from 'midwayjs-cool-core';
  11. /**
  12. * 租机表
  13. */
  14. @EntityModel('shuyou_rent_computer')
  15. export class ShuyouRentComputerEntity extends BaseEntity {
  16. @Index()
  17. @Column({ comment: '电脑编号', length: 100 })
  18. pc_num: string;
  19. @Index()
  20. @Column({ comment: '电脑名称', length: 100 })
  21. pc_name: string;
  22. @Column({ comment: '租机店铺ID' })
  23. shop_id: number;
  24. @Index()
  25. @Column({ comment: '套餐', length: 100, nullable: true })
  26. set_meal: string;
  27. @Column({ type: 'datetime', comment: '起租时间' })
  28. rent_start: Date;
  29. @Column({ comment: '租机时常(天)' })
  30. rent_duration: number;
  31. @Column({ type: 'datetime', comment: '到期时间' })
  32. rent_end: Date;
  33. @Column({
  34. comment: '价格套餐 0:天卡 1:周卡 2:月卡',
  35. default: 0,
  36. type: 'tinyint',
  37. })
  38. price_type: number;
  39. @Column({
  40. comment: '价格标准',
  41. type: 'decimal',
  42. precision: 10,
  43. scale: 2,
  44. default: 0,
  45. })
  46. rent_price: number;
  47. @Column({
  48. comment: '折算天租金',
  49. type: 'decimal',
  50. precision: 10,
  51. scale: 5,
  52. default: 0,
  53. })
  54. rent_price_day: number;
  55. @Column({
  56. comment: '结算方式 0:先付后用 1:先用后付 2:其他方式',
  57. default: 0,
  58. type: 'tinyint',
  59. })
  60. pay_method: number;
  61. @Column({
  62. comment: '是否到期 0:否 1:是 2:明日到期',
  63. default: 0,
  64. type: 'tinyint',
  65. })
  66. is_expire: number;
  67. @Column({
  68. type: 'decimal',
  69. comment: '当前租赁期内已产生多少租金',
  70. precision: 10,
  71. scale: 5,
  72. default: 0,
  73. })
  74. rent_price_used: number;
  75. @Column({ comment: '租赁人', nullable: true })
  76. rent_person_id: number;
  77. // 任务ID列表,映射使用人列表
  78. taskIdList: string[];
  79. @Column({ comment: '备注', nullable: true })
  80. remark: string;
  81. }