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

/**
 * 描述
 */
@Entity('dj_rate')
export class RateEntity extends BaseEntity {
  @Column({ comment: '商户号' })
  mchId: string;

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

  @Column({ comment: '类型 1-代收 2-代付', default: 1 })
  type: number;

  @Column({ comment: '支付方式', nullable: true})
  payType: string;

  @Column({ comment: '费率', type: 'decimal', precision: 10, scale: 2 })
  rate: number;

  @Column({ comment: '单笔固定费用', type: 'decimal', precision: 10, scale: 2 })
  basicFee: number;

  @Column({ comment: '单笔最低费用', type: 'decimal', precision: 10, scale: 2 })
  feeMin: number;
}
