You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
672 B

5 years ago
  1. <?php
  2. namespace App\Model\v3;
  3. use App\Model\Model;
  4. class Order extends Model
  5. {
  6. protected $table = 'lanzu_order';
  7. public function orderGoods()
  8. {
  9. return $this->hasMany(OrderGoods::class, 'order_id', 'id');
  10. }
  11. public function market()
  12. {
  13. return $this->belongsTo(Market::class, 'market_id', 'id');
  14. }
  15. public function orderMain()
  16. {
  17. return $this->belongsTo(OrderMain::class, 'order_main_id', 'id');
  18. }
  19. public function user()
  20. {
  21. return $this->belongsTo(User::class, 'user_id', 'id');
  22. }
  23. public function store()
  24. {
  25. return $this->belongsTo(Store::class, 'store_id', 'id');
  26. }
  27. }