<?php

namespace App\Models\Gteam;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\Gteam\EnterModel
 *
 * @property int $id
 * @property \Illuminate\Support\Carbon $created_at 创建时间
 * @property \Illuminate\Support\Carbon $updated_at 更新时间
 * @property int $uid 用户
 * @property string $enter_type
 * @property int $activity_id 活动id
 * @property string $type 预约类型cj_wx:吃鸡微信|cj_qq:吃鸡QQ|wz_wx:王者微信|wz_qq王者QQ
 * @property int $rank_type rank要求
 * @property int $sex 性别限制0不限|1男|2女
 * @property int $match_succ_at 成功时间
 * @property int $room_id 房间id
 * @property int $score 分数
 * @property-read \App\Models\Gteam\ActivityModel $activity
 * @property-read \App\Models\Gteam\RoomModel $room
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereActivityId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereEnterType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereMatchSuccAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereRankType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereRoomId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereScore($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereSex($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereUid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\EnterModel whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class EnterModel extends Model
{

    protected $table = 'kdgx_gteam_enter_list';

    protected $dateFormat = 'U';

    protected $fillable = ['uid', 'activity_id', 'type', 'rank_type', 'enter_type', 'sex', 'match_succ_at', 'room_id'];


    public function activity()
    {
        return $this->belongsTo(ActivityModel::class);
    }


    public function room()
    {
        return $this->belongsTo(RoomModel::class);
    }
}
