wangzhibo
4 天以前 c19f1f7e21c93d1f13b4f44a8a615f65af577559
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
import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';
 
/**
 * 流水记录
 */
@Entity('t_recycle_transaction')
export class RecycleTransactionEntity extends BaseEntity {
  @Index()
  @Column({ comment: '用户ID' })
  userId: string;
 
  @Index()
  @Column({ comment: '机构ID', nullable: true })
  departmentId: number;
 
  @Column({ comment: '流水类型', dict: ['收入', '支出'], default: '收入' })
  type: string;
 
  @Column({
    comment: '金额',
    type: 'decimal',
    precision: 15,
    scale: 2,
  })
  amount: number;
 
  @Column({
    comment: '来源类型',
    dict: ['回收', '商城', '赠送', '接受', '捐赠', '签到'],
    default: '回收',
  })
  sourceType: string;
 
  @Column({ comment: '备注', nullable: true })
  remark: string;
 
  @Index()
  @Column({ comment: '订单ID', nullable: true })
  orderId: string;
  
}