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

/**
 * 描述
 */
@Entity('dj_mch')
export class MerchantEntity extends BaseEntity {
  @Column({ comment: '系统用户Id' })
  userId: string;

  @Column({ comment: '商户名' })
  name: string;

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

  @Column({ comment: '邮箱' })
  email: string;

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

  @Column({ comment: '资金密码' })
  fundPwd: string;

  @Column({ comment: 'MD5Key' })
  key: string;

  @Column({ comment: 'secret' })
  secret: string;

  @Column({ comment: 'IP白名单', length: 1000, default: '' })
  whiteIp: string;

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