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

/**
 * 账单信息
 */
@Entity('dj_bill')
export class BillEntity extends BaseEntity {
  @Index()
  @Column({ comment: '日期', type: 'date', nullable: true })
  date: Date;

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

  @Column({ comment: '总订单数' })
  total: number;

  @Column({ comment: '成交订单数' })
  num: number;

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

  @Column({ comment: '通道手续费', type: 'decimal', precision: 10, scale: 2 })
  channelCharge: number;

  @Column({ comment: '手续费', type: 'decimal', precision: 10, scale: 2 })
  charge: number;
}
