hyperf-chat/app/Model/BaseModel.php

32 lines
445 B
PHP
Raw Permalink Normal View History

2020-11-02 22:45:37 +08:00
<?php
declare(strict_types=1);
2020-11-04 11:57:16 +08:00
2020-11-02 22:45:37 +08:00
namespace App\Model;
2020-11-05 17:40:51 +08:00
use Hyperf\DbConnection\Model\Model as CModel;
2020-11-02 22:45:37 +08:00
2020-11-13 23:09:56 +08:00
/**
* 数据库模型 - 基础类
*
* @package App\Model
*/
2020-11-05 17:40:51 +08:00
abstract class BaseModel extends CModel
2020-11-02 22:45:37 +08:00
{
2021-07-12 22:00:48 +08:00
/**
* 不可批量赋值的属性
*
* @var array
*/
protected $guarded = [
'id'
];
2020-11-13 23:09:56 +08:00
/**
* 关闭自动维护时间字段
*
* @var bool
*/
2020-11-04 16:47:17 +08:00
public $timestamps = false;
2020-11-02 22:45:37 +08:00
}