123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace App\Models\Syj;
- use Illuminate\Database\Eloquent\Model;
- /**
- * App\Models\Syj\TacitPaintModel
- *
- * @property int $id
- * @property string $openid
- * @property string $photo 图片地址
- * @property \Illuminate\Support\Carbon $created_at
- * @property \Illuminate\Support\Carbon $updated_at
- * @property string $uuid
- * @property int $parent_id 父级id
- * @property-read \App\Models\Syj\UserModel $user
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel query()
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereOpenid($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereParentId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel wherePhoto($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereUpdatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Syj\TacitPaintModel whereUuid($value)
- * @mixin \Eloquent
- */
- class TacitPaintModel extends Model
- {
- protected $table = 'syj_game_tacit_paints';
- protected $dateFormat = 'U';
- protected $fillable = ['openid', 'photo', 'uuid', 'parent_id'];
- public function user()
- {
- return $this->belongsTo(UserModel::class, 'openid', 'openid')->select('nickname', 'avatar', 'sex');
- }
- }
|