MessagewallModel.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Models\Messagewall;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Models\User\UserModel;
  5. /**
  6. * App\Models\Messagewall\MessagewallModel
  7. *
  8. * @property int $id
  9. * @property int $master_uid 被留言者
  10. * @property int $guest_uid 留言者
  11. * @property string $content 留言内容
  12. * @property \Illuminate\Support\Carbon $created_at 创建时间
  13. * @property \Illuminate\Support\Carbon $updated_at 修改时间
  14. * @property \Illuminate\Support\Carbon $deleted_at 删除时间
  15. * @property-read \App\Models\User\UserModel $user
  16. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel newModelQuery()
  17. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel newQuery()
  18. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel query()
  19. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel whereContent($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel whereCreatedAt($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel whereDeletedAt($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel whereGuestUid($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel whereId($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel whereMasterUid($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Messagewall\MessagewallModel whereUpdatedAt($value)
  26. * @mixin \Eloquent
  27. */
  28. class MessagewallModel extends Model
  29. {
  30. //
  31. protected $table = 'kdgx_fpdx_messagewall';
  32. protected $dateFormat = 'U';
  33. protected $dates = ['created_at', 'updated_at', 'deleted_at'];
  34. public $fillable = ['master_uid', 'guest_uid', 'content', 'deleted_at'];
  35. protected $hidden = ['deleted_at'];
  36. public function user()
  37. {
  38. return $this->belongsTo(UserModel::class, 'guest_uid', 'uid')->select('nickname', 'headimgurl', 'sex');
  39. }
  40. }