'department_id']; protected $table = 'draw_records'; public $timestamps = false; protected $fillable = ['uid', 'prize_id', 'prize_type', 'prize_name', 'prize_pic', 'game_id', 'game_type', 'department_id', 'draw_time', 'ip', 'consume']; /** * 奖品信息 * @return BelongsTo */ public function prize(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.prize_model'), 'prize_id', 'id'); } /** * 玩家信息 * @return BelongsTo */ public function player(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.player_model'), 'uid')->withTrashed(); } /** * 渠道信息 * @return BelongsTo */ public function channel(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.channel_model'), 'department_id', 'department_id')->withTrashed(); } }