| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- // +----------------------------------------------------------------------
- // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
- // +----------------------------------------------------------------------
- // | 版权所有 2017~2021 LARAVEL研发中心
- // +----------------------------------------------------------------------
- // | 官方网站: http://www.laravel.cn
- // +----------------------------------------------------------------------
- // | Author: laravel开发员 <laravel.qq.com>
- // +----------------------------------------------------------------------
- namespace App\Models;
- /**
- * 商品评论-模型
- * @author laravel开发员
- * @since 2020/11/11
- * @package App\Models
- */
- class GoodsCommentModel extends BaseModel
- {
- // 设置数据表
- protected $table = 'goods_comments';
- /**
- * 发布用户
- * @return \Illuminate\Database\Eloquent\Relations\HasOne
- */
- public function user()
- {
- return $this->hasOne(MemberModel::class, 'id', 'user_id')
- ->select(['id','openid', 'mobile', 'nickname','balance', 'realname', 'status']);
- }
- }
|