|
|
@@ -6,38 +6,39 @@ export class PaymentEntity {
|
|
|
@PrimaryGeneratedColumn({ comment: '支付记录ID' })
|
|
|
id!: number;
|
|
|
|
|
|
- @Column({ type: 'int', unsigned: true, comment: '外部订单ID(用于与业务系统集成)' })
|
|
|
+ @Column({ type: 'int', unsigned: true, name: 'external_order_id', comment: '外部订单ID(用于与业务系统集成)' })
|
|
|
externalOrderId!: number;
|
|
|
|
|
|
- @Column({ type: 'int', unsigned: true, comment: '用户ID' })
|
|
|
+ @Column({ type: 'int', unsigned: true, name: 'user_id', comment: '用户ID' })
|
|
|
userId!: number;
|
|
|
|
|
|
- @Column({ type: 'int', unsigned: true, comment: '支付金额(分)' })
|
|
|
+ @Column({ type: 'int', unsigned: true, name: 'total_amount', comment: '支付金额(分)' })
|
|
|
totalAmount!: number;
|
|
|
|
|
|
- @Column({ type: 'varchar', length: 128, comment: '支付描述' })
|
|
|
+ @Column({ type: 'varchar', length: 128, name: 'description', comment: '支付描述' })
|
|
|
description!: string;
|
|
|
|
|
|
@Column({
|
|
|
type: 'enum',
|
|
|
enum: PaymentStatus,
|
|
|
default: PaymentStatus.PENDING,
|
|
|
+ name: 'payment_status',
|
|
|
comment: '支付状态'
|
|
|
})
|
|
|
paymentStatus!: PaymentStatus;
|
|
|
|
|
|
- @Column({ type: 'varchar', length: 64, nullable: true, comment: '微信支付交易ID' })
|
|
|
+ @Column({ type: 'varchar', length: 64, nullable: true, name: 'wechat_transaction_id', comment: '微信支付交易ID' })
|
|
|
wechatTransactionId?: string;
|
|
|
|
|
|
- @Column({ type: 'varchar', length: 64, nullable: true, comment: '商户订单号' })
|
|
|
+ @Column({ type: 'varchar', length: 64, nullable: true, name: 'out_trade_no', comment: '商户订单号' })
|
|
|
outTradeNo?: string;
|
|
|
|
|
|
- @Column({ type: 'varchar', length: 64, comment: '用户OpenID' })
|
|
|
+ @Column({ type: 'varchar', length: 64, name: 'openid', comment: '用户OpenID' })
|
|
|
openid!: string;
|
|
|
|
|
|
- @CreateDateColumn({ comment: '创建时间' })
|
|
|
+ @CreateDateColumn({ name: 'created_at', comment: '创建时间' })
|
|
|
createdAt!: Date;
|
|
|
|
|
|
- @UpdateDateColumn({ comment: '更新时间' })
|
|
|
+ @UpdateDateColumn({ name: 'updated_at', comment: '更新时间' })
|
|
|
updatedAt!: Date;
|
|
|
}
|