wangzhibo
2026-07-28 2b662657c5bc5bc45b69f475c7b2edcf8fc92f0c
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
import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';
 
/**
 * 交易记录
 */
@Entity('t_operation_trade_record')
export class OperationTradeRecordEntity extends BaseEntity {
  @Index()
  @Column({ comment: '交易时间', nullable: true })
  transactionTime: Date;
 
  @Column({ comment: '交易类型', nullable: true })
  transactionType: string;
 
  @Index()
  @Column({ comment: '交易对方', nullable: true })
  opponent: string;
 
  @Index()
  @Column({ comment: '商品名称', nullable: true })
  goodsName: string;
 
  @Column({ comment: '收支类型', dict: ['收入', '支出', '其他'], default: '收入' })
  incomeType: string;
 
  @Column({ comment: '金额', type: 'decimal', precision: 12, scale: 2, default: 0 })
  amount: number;
 
  @Column({ comment: '支付方式', nullable: true })
  payMethod: string;
 
  @Column({ comment: '当前状态', nullable: true })
  status: string;
 
  @Index()
  @Column({ comment: '交易单号', length: 100, nullable: true })
  transactionNo: string;
 
  @Index()
  @Column({ comment: '商户单号', length: 100, nullable: true })
  merchantNo: string;
 
  @Column({ comment: '备注', type: 'text', nullable: true })
  remark: string;
 
  @Column({ comment: '所属部门' })
  departmentId: number;
 
  departmentName: string;
 
  @Column({ comment: '原始文件路径', length: 500 })
  filepath: string;
  
}