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

/**
 * 商户钱包
 */
@Entity('dj_wallet')
export class WalletEntity extends BaseEntity {
  @Column({ comment: '商户号' })
  mchId: string;

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

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

  @Column({
    comment: '冻结中余额',
    type: 'decimal',
    precision: 10,
    scale: 2,
    default: 0,
  })
  freeze: number;
}
