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.
30 lines
566 B
30 lines
566 B
<?php
|
|
|
|
namespace App\Model\v3;
|
|
|
|
use App\Model\Model;
|
|
|
|
class Order extends Model
|
|
{
|
|
protected $table = 'lanzu_order';
|
|
|
|
public function orderGoods()
|
|
{
|
|
return $this->hasMany(OrderGoods::class, 'order_id', 'id');
|
|
}
|
|
|
|
public function market()
|
|
{
|
|
return $this->belongsTo(Market::class, 'market_id', 'id');
|
|
}
|
|
|
|
public function orderMain()
|
|
{
|
|
return $this->belongsTo(OrderMain::class, 'order_main_id', 'id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'id');
|
|
}
|
|
}
|