Files
chatroom/app/Models/Room.php

58 lines
1.1 KiB
PHP
Raw Normal View History

<?php
/**
* 文件功能:聊天房间模型
*
* 对应原 ASP 文件room
*
* @author ChatRoom Laravel
*
* @version 1.0.0
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Room extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'room_name',
'room_auto',
'room_owner',
'room_des',
'room_top',
'room_title',
'room_keep',
'room_time',
'room_tt',
'room_html',
'room_exp',
'build_time',
'permit_level',
'door_open',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'room_time' => 'datetime',
'build_time' => 'datetime',
'room_keep' => 'boolean',
'room_tt' => 'boolean',
'room_html' => 'boolean',
'door_open' => 'boolean',
];
}
}