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

/**
 * 字典信息
 */
@Entity('dj_withdraw_channel')
export class WithdrawChannelEntity extends BaseEntity {
  @Column({ comment: '通道名' })
  name: string;

  @Index({ unique: true })
  @Column({ comment: '通道编码' })
  code: string;

  @Column({ comment: '代码服务' })
  service: string;

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

  @Column({ comment: '费率' })
  rate: string;

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

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

  @Column({ comment: '单笔最大', type: 'decimal', precision: 10, scale: 2 })
  max: number;

  @Column({ comment: '单笔最小', type: 'decimal', precision: 10, scale: 2 })
  min: number;

  @Column({ comment: '状态 0-未启用 1 启用', type: 'tinyint', default: 1 })
  status: number;

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