| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- namespace app\common\model;
- class GoodsOrder extends BaseModel
- {
- /**
- * @var string
- */
- protected $name = 'goods_order';
- /**
- * @var array
- */
- protected $auto = [];
- /**
- * @var array
- */
- protected $insert = ['created_at','updated_at'];
- /**
- * @var array
- */
- protected $update = ['updated_at'];
- /**
- *
- * @author 许祖兴 < zuxing.xu@lettered.cn>
- * @date 2020/7/3 9:14
- *
- * @return \think\model\relation\BelongsTo
- */
- public function user()
- {
- return $this->belongsTo('Users','user_id','id');
- }
- /**
- *
- * @author 许祖兴 < zuxing.xu@lettered.cn>
- * @date 2020/7/3 9:14
- *
- * @return \think\model\relation\BelongsTo
- */
- public function seller()
- {
- return $this->belongsTo('Seller','seller_id','id');
- }
- /**
- *
- * @author 许祖兴 < zuxing.xu@lettered.cn>
- * @date 2020/7/3 9:14
- *
- * @return \think\model\relation\BelongsTo
- */
- public function addr()
- {
- return $this->belongsTo('UsersAddr','addr_id','id');
- }
- public function goods(){
- return $this->hasMany('','','id');
- }
- /**
- *
- * @author 许祖兴 < zuxing.xu@lettered.cn>
- * @date 2020/7/3 9:13
- *
- * @return \think\model\relation\belongsTo
- */
- public function detail()
- {
- return $this->belongsTo('GoodsOrderDetail','id', 'order_id');
- }
- }
|