1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
| import { BaseEntity } from '../../base/entity/base';
| import { Column, Entity, Index } from "typeorm";
|
| /**
| * 回收物品订单
| */
| @Entity("t_recycle_order")
| export class RecycleOrderEntity extends BaseEntity {
| @Index({ unique: true })
| @Column({ comment: "订单编号" })
| orderNo: string;
|
| @Column({ comment: "订单类型", dict: ['现场', '预约', '大屏', '活动'], default: '现场' })
| orderType: string;
|
| @Index()
| @Column({ comment: "用户ID" })
| campusUserId: string;
|
| campusUserName: string;
|
| @Index()
| @Column({ comment: '学校ID', nullable: true }) // 使用归属部门,这里建议选顶层学校
| departmentId: number;
|
| departmentName: string;
|
| @Index()
| @Column({ comment: "站点ID", nullable: true})
| siteId: string;
|
| @Index()
| @Column({ comment: "分拣员ID", nullable: true, default: 0 })
| sorterId: string;
|
| @Index()
| @Column({ comment: "预约ID", nullable: true})
| appointmentId: number;
|
| @Column({ comment: '状态', dict: ['待处理', '进行中', '已完成', '已取消'], default: '已完成', })
| status: string;
|
| @Column({ comment: '总重量', type: 'decimal', precision: 10, scale: 2, default: 0, })
| totalWeight: number;
|
| @Column({ comment: '总金额', type: 'decimal', precision: 10, scale: 2, default: 0, })
| totalAmount: number;
|
| @Column({ comment: '总碳积分', type: 'decimal', precision: 10, scale: 2, default: 0, })
| totalCarbonPoint: number;
|
| @Column({ comment: '完成时间', nullable: true })
| finishTime: Date;
|
|
| }
|
|