1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class StudioOrder extends Model{
- protected $table='studio_order';
- public function get_studio_detail(){
- return $this->hasMany(StudioOrderDetail::class,'order_id');
- }
- public function belong_user(){
- return $this->belongsTo(User::class,'good_user_id');
- }
- public function get_good(){
- return $this->belongsTo(StudioGood::class,'goods_id','id');
- }
- public function address(){
- return $this->belongsTo(Address::class,'address_id');
- }
- /**获取物流信息**/
- public function get_express(){
- return $this->hasMany(StudioExpress::class,'order_id');
- }
- }
|