ComplaintModel.php 762 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * 投诉建议模型
  6. */
  7. class ComplaintModel extends Model
  8. {
  9. /**
  10. * 表名
  11. */
  12. protected $table = 'lev_complaint';
  13. /**
  14. * 主键
  15. */
  16. protected $primaryKey = 'id';
  17. /**
  18. * 时间戳
  19. */
  20. public $timestamps = false;
  21. /**
  22. * 可批量赋值的属性
  23. */
  24. protected $fillable = [
  25. 'user_id',
  26. 'mobile',
  27. 'realname',
  28. 'content',
  29. 'albums',
  30. 'create_time',
  31. 'update_time',
  32. 'remark',
  33. 'status',
  34. 'mark'
  35. ];
  36. /**
  37. * 关联用户
  38. */
  39. public function user()
  40. {
  41. return $this->belongsTo(MemberModel::class, 'user_id', 'id');
  42. }
  43. }