open_webhook.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { Column, Entity, Index } from 'typeorm';
  2. import { BaseEntity } from '@cool-midway/core';
  3. import { OrderType } from './open_payment_order';
  4. export enum StatusType {
  5. SUBMITTED = 'SUBMITTED', // 已提交
  6. ACTIVE = 'ACTIVE', // 激活
  7. FAILED = 'FAILED', // 失败
  8. SUSPENDED = 'SUSPENDED', // 冻结
  9. TERMINATED = 'TERMINATED', // 关闭
  10. }
  11. /**
  12. * 收款账户
  13. */
  14. @Entity('open_webhook')
  15. export class OpenWebhookEntity extends BaseEntity {
  16. @Column({ length: 255, comment: '商户编号', default: '' })
  17. mch_id: string;
  18. @Index({ unique: true })
  19. @Column({ length: 255, comment: '回调地址', default: '' })
  20. url?: string;
  21. @Column({ comment: '监听业务类型', type: 'json' })
  22. types: string[];
  23. @Column({ comment: '渠道代码', length: 50})
  24. channel: string;
  25. // @Column({ length: 255, comment: '企业名称', default: '' })
  26. // name?: string;
  27. // @Column({ length: 255, comment: '联系方式', default: '' })
  28. // phone?: string;
  29. // @Column({ length: 255, comment: '地址', default: '' })
  30. // address?: string;
  31. // @Column({ length: 255, comment: '公司类型', default: '' })
  32. // company_type?: string;
  33. // @Column({ length: 255, comment: '账户状态', default: '' })
  34. // status?: StatusType; // 使用枚举类型
  35. // @Column({ length: 255, comment: '客户来源', default: '' })
  36. // source?: string;
  37. }