RoomModel.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Models\Gteam;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * App\Models\Gteam\RoomModel
  6. *
  7. * @property int $id
  8. * @property \Illuminate\Support\Carbon $created_at 创建时间
  9. * @property \Illuminate\Support\Carbon $updated_at 更新时间
  10. * @property string|null $name 房间名称
  11. * @property int $number 房间人数
  12. * @property string $type 房间类型cj_wx:吃鸡微信|cj_qq:吃鸡QQ|wz_wx:王者微信|wz_qq王者QQ
  13. * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Gteam\RoomMemberModel[] $members
  14. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel newModelQuery()
  15. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel newQuery()
  16. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel query()
  17. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel whereCreatedAt($value)
  18. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel whereId($value)
  19. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel whereName($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel whereNumber($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel whereType($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Gteam\RoomModel whereUpdatedAt($value)
  23. * @mixin \Eloquent
  24. */
  25. class RoomModel extends Model
  26. {
  27. //
  28. protected $table = 'kdgx_gteam_room';
  29. protected $dateFormat = 'U';
  30. protected $fillable = ['name', 'number', 'type'];
  31. public function members()
  32. {
  33. return $this->hasMany(RoomMemberModel::class, 'room_id', 'id');
  34. }
  35. }