Trade.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace app\cxinv\model;
  3. use app\user\model\Business;class Trade extends Base
  4. {
  5. //设置字段信息
  6. protected $schema = [
  7. 'id' =>'bigint',//
  8. 'pcCode'=>'varchar',//pc单号
  9. 'tradNo' =>'varchar',//打款交易记录编号
  10. 'trade_bank' =>'varchar',//交易银行
  11. 'trade_account' =>'varchar',//交易账户
  12. 'trade_type' =>'int',//交易类型 0 自营资金1 平台资金
  13. 'trade_time' =>'datetime',//交易时间
  14. 'trade_used' =>'varchar',//交易用途
  15. 'trade_out' =>'varchar',//付款方
  16. 'trade_in' =>'varchar',//收款方
  17. 'trade_in_code' =>'varchar',//收款方
  18. 'trade_remark' =>'varchar',//打款备注
  19. 'total_fee' =>'decimal',//总额
  20. 'used_fee' =>'decimal',//已认领额度
  21. 'balance' =>'decimal',//余额
  22. "poCode"=>'varchar',//po单号
  23. "NdCode"=>'varchar',//Nd单号
  24. 'customerNo' =>'varchar',//客户编号
  25. 'customerName' =>'varchar',//客户编号
  26. 'companyNo' =>'varchar',//业务公司编号
  27. 'companyName' =>'varchar',//业务公司编号
  28. 'trade_in_account' =>'varchar',//收款账户
  29. "apply_id"=>"int",
  30. "apply_name"=>"varchar",
  31. 'status' =>'int',//状态 1 未认领2部分认领 3 全部认领
  32. 'is_del' =>'int',//
  33. 'addtime' =>'datetime',//
  34. 'updatetime' =>'datetime',//
  35. ];
  36. protected $createTime = 'addtime';
  37. protected $updateTime = 'updatetime';
  38. public function Lib(){
  39. return $this->belongsTo(TradeLib::class,'tradNo','tradNo')->bind(["palt_po","skuCode","goodName","goodNo","goodNum","unit","platPrice","plat_total","tax","cat_code","cat_name","comPrice","com_total"]);
  40. }
  41. }