| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace app\common\model;
- class UsersAgent extends BaseModel
- {
- /**
- * @var string
- */
- protected $name = 'users_agent';
- /**
- * @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/9 9:38
- *
- * @return \think\model\relation\BelongsTo
- */
- public function user()
- {
- return $this->belongsTo('Users','user_id','id');
- }
- /**
- * 关联 区域
- *
- * @author 许祖兴 < zuxing.xu@lettered.cn>
- * @date 2020/7/9 9:38
- *
- * @return \think\model\relation\BelongsTo
- */
- public function area()
- {
- return $this->belongsTo('China','area_id','id');
- }
- }
|