2020-11-05 17:40:51 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare (strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Model\Article;
|
|
|
|
|
|
|
|
use App\Model\BaseModel;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 笔记分类数据表模型
|
|
|
|
*
|
2021-04-20 16:30:57 +08:00
|
|
|
* @property integer $id 分类ID
|
|
|
|
* @property integer $user_id 用户ID
|
|
|
|
* @property string $class_name 分类名
|
|
|
|
* @property integer $sort 排序[值越小越靠前]
|
2020-11-13 23:09:56 +08:00
|
|
|
* @property integer $is_default 默认分类[1:是;0:不是]
|
2021-04-20 16:30:57 +08:00
|
|
|
* @property string $created_at 创建时间
|
2020-11-05 17:40:51 +08:00
|
|
|
* @package App\Model\Article
|
|
|
|
*/
|
|
|
|
class ArticleClass extends BaseModel
|
|
|
|
{
|
2022-01-16 10:29:16 +08:00
|
|
|
|
|
|
|
|
2020-11-05 17:40:51 +08:00
|
|
|
protected $table = 'article_class';
|
|
|
|
|
2022-01-16 10:29:16 +08:00
|
|
|
public $timestamps = true;
|
|
|
|
|
2020-11-05 17:40:51 +08:00
|
|
|
protected $fillable = [
|
|
|
|
'user_id',
|
|
|
|
'class_name',
|
|
|
|
'sort',
|
|
|
|
'is_default',
|
|
|
|
'created_at',
|
2022-01-16 10:29:16 +08:00
|
|
|
'updated_at',
|
2020-11-05 17:40:51 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
protected $casts = [
|
2021-04-20 16:30:57 +08:00
|
|
|
'user_id' => 'integer',
|
|
|
|
'sort' => 'integer',
|
2020-11-05 17:40:51 +08:00
|
|
|
'is_default' => 'integer',
|
2022-01-16 10:29:16 +08:00
|
|
|
'created_at' => 'datetime',
|
|
|
|
'updated_at' => 'datetime'
|
2020-11-05 17:40:51 +08:00
|
|
|
];
|
|
|
|
}
|