TradeReturn.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\cxinv\model;
  3. class TradeReturn extends Base
  4. {
  5. //设置字段信息
  6. protected $schema = [
  7. 'id' =>'bigint',//
  8. 'returnCode' =>'varchar',//退款编号
  9. 'logNo' =>'varchar',//资金认领编号
  10. 'tradNo' =>'varchar',//资金编号
  11. 'companyNo' =>'varchar',//业务公司
  12. 'type' =>'tinyint',//退款类型 1 退回认领资金 2 退款
  13. 'apply_id' =>'int',//申请id
  14. 'apply_name' =>'varchar',//申请人名称
  15. 'return_reason' =>'varchar',//退款原因
  16. 'remark' =>'varchar',//备注
  17. 'return_img' =>'longtext',//退款截图凭证(最多10张图片)
  18. 'status' =>'tinyint',//审核状态
  19. 'is_del' =>'tinyint',//是否删除
  20. 'addtime' =>'datetime',//
  21. 'updatetime' =>'datetime',//
  22. ];
  23. protected $createTime = 'addtime';
  24. protected $updateTime = 'updatetime';
  25. public function Trade(){
  26. return $this->belongsTo(Trade::class,'tradNo','tradNo')
  27. ->bind(['trade_out','trade_in','trade_bank','companyName','companyNo','customerName','customerNo','total_fee','balance','used_fee','poCode','NdCode']);
  28. }
  29. public function Pool(){
  30. return $this->belongsTo(TradePool::class,'logNo','logNo');
  31. }
  32. }