import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * 字典信息
 */
@Entity('dj_balance')
export class BalanceEntity extends BaseEntity {
  @Column({ comment: '订单号' })
  orderNo: string;

  @Column({ comment: '商户号' })
  mchId: string;

  @Column({
    comment: '类型 1-代收 2-下发 3 冲正 4 内充',
    type: 'tinyint',
    default: 0,
  })
  type: number;

  @Column({ comment: '货币单位' })
  currency: string;

  @Column({
    comment: '金额',
    type: 'decimal',
    precision: 10,
    scale: 2,
    default: 0,
  })
  amount: number;

  @Column({ comment: '备注', nullable: true })
  remark: string;
}
