| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- /**
- * 投诉建议模型
- */
- class ComplaintModel extends Model
- {
- /**
- * 表名
- */
- protected $table = 'lev_complaint';
- /**
- * 主键
- */
- protected $primaryKey = 'id';
- /**
- * 时间戳
- */
- public $timestamps = false;
- /**
- * 可批量赋值的属性
- */
- protected $fillable = [
- 'user_id',
- 'mobile',
- 'realname',
- 'content',
- 'albums',
- 'create_time',
- 'update_time',
- 'remark',
- 'status',
- 'mark'
- ];
- /**
- * 关联用户
- */
- public function user()
- {
- return $this->belongsTo(MemberModel::class, 'user_id', 'id');
- }
- }
|