import { Column, Entity, Index } from 'typeorm'; import { BaseEntity } from '@cool-midway/core'; import { OrderType } from './open_payment_order'; export enum StatusType { SUBMITTED = 'SUBMITTED', // 已提交 ACTIVE = 'ACTIVE', // 激活 FAILED = 'FAILED', // 失败 SUSPENDED = 'SUSPENDED', // 冻结 TERMINATED = 'TERMINATED', // 关闭 } /** * 收款账户 */ @Entity('open_webhook') export class OpenWebhookEntity extends BaseEntity { @Column({ length: 255, comment: '商户编号', default: '' }) mch_id: string; @Index({ unique: true }) @Column({ length: 255, comment: '回调地址', default: '' }) url?: string; @Column({ comment: '监听业务类型', type: 'json' }) types: string[]; @Column({ comment: '渠道代码', length: 50}) channel: string; // @Column({ length: 255, comment: '企业名称', default: '' }) // name?: string; // @Column({ length: 255, comment: '联系方式', default: '' }) // phone?: string; // @Column({ length: 255, comment: '地址', default: '' }) // address?: string; // @Column({ length: 255, comment: '公司类型', default: '' }) // company_type?: string; // @Column({ length: 255, comment: '账户状态', default: '' }) // status?: StatusType; // 使用枚举类型 // @Column({ length: 255, comment: '客户来源', default: '' }) // source?: string; }