TacitPaintModel.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace App\Models\Syj;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * App\Models\Syj\TacitPaintModel
  6. *
  7. * @property int $id
  8. * @property string $openid
  9. * @property string $photo 图片地址
  10. * @property \Illuminate\Support\Carbon $created_at
  11. * @property \Illuminate\Support\Carbon $updated_at
  12. * @property string $uuid
  13. * @property int $parent_id 父级id
  14. * @property-read \App\Models\Syj\UserModel $user
  15. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel newModelQuery()
  16. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel newQuery()
  17. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel query()
  18. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereCreatedAt($value)
  19. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereId($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereOpenid($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereParentId($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel wherePhoto($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereUpdatedAt($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereUuid($value)
  25. * @mixin \Eloquent
  26. */
  27. class TacitPaintModel extends Model
  28. {
  29. protected $table = 'syj_game_tacit_paints';
  30. protected $dateFormat = 'U';
  31. protected $fillable = ['openid', 'photo', 'uuid', 'parent_id'];
  32. public function user()
  33. {
  34. return $this->belongsTo(UserModel::class, 'openid', 'openid')->select('nickname', 'avatar', 'sex');
  35. }
  36. }