OrderReturn.php 798 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\model;
  3. use support\Model;
  4. class OrderReturn extends Model
  5. {
  6. protected $table = 'order_return';
  7. protected $primaryKey = 'orders_return_id';
  8. protected $dateFormat = 'U';
  9. const CREATED_AT = 'order_return_addtimes';
  10. const UPDATED_AT = null;
  11. public function member()
  12. {
  13. return $this->hasOne(Member::class, 'member_id', 'join_return_member_id');
  14. }
  15. public function info(){
  16. return $this->hasOne(MemberInfo::class,'join_info_member_id','join_return_member_id');
  17. }
  18. public function cert()
  19. {
  20. return $this->hasOne(MemberCert::class, 'join_cert_member_id', 'join_return_member_id');
  21. }
  22. public function order()
  23. {
  24. return $this->hasOne(Order::class, 'order_id', 'join_return_order_id');
  25. }
  26. }