PaintModel.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Models\Deed;
  3. use App\Models\User\UserModel;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * App\Models\Deed\PaintModel
  7. *
  8. * @property int $id
  9. * @property int $uid
  10. * @property string $name
  11. * @property string $pic_url 图片地址
  12. * @property string $actions
  13. * @property int $partner_id
  14. * @property \Illuminate\Support\Carbon $created_at
  15. * @property \Illuminate\Support\Carbon $updated_at
  16. * @property-read \App\Models\User\UserModel $user
  17. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel newModelQuery()
  18. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel newQuery()
  19. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel query()
  20. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel whereActions($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel whereCreatedAt($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel whereId($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel whereName($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel wherePartnerId($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel wherePicUrl($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel whereUid($value)
  27. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Deed\PaintModel whereUpdatedAt($value)
  28. * @mixin \Eloquent
  29. */
  30. class PaintModel extends Model
  31. {
  32. //
  33. protected $table = 'kdgx_fpdx_deed_paints';
  34. public $dateFormat = 'U';
  35. protected $fillable = ['uid', 'name', 'actions', 'pic_url'];
  36. public function user()
  37. {
  38. return $this->belongsTo(UserModel::class, 'uid', 'uid')
  39. ->select('uid', 'nickname', 'headimgurl', 'sex');
  40. }
  41. }