34 lines
805 B
PHP
34 lines
805 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
/**
|
|
* This file is part of Hyperf.
|
|
*
|
|
* @link https://www.hyperf.io
|
|
* @document https://hyperf.wiki
|
|
* @contact group@hyperf.io
|
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
|
*/
|
|
|
|
namespace App\Model;
|
|
|
|
use Hyperf\Database\Model\SoftDeletes;
|
|
use Hyperf\DbConnection\Model\Model as BaseModel;
|
|
use Hyperf\ModelCache\Cacheable;
|
|
use Hyperf\ModelCache\CacheableInterface;
|
|
|
|
abstract class Model extends BaseModel implements CacheableInterface
|
|
{
|
|
use Cacheable, SoftDeletes;
|
|
|
|
protected ?string $dateFormat = 'U';
|
|
|
|
protected array $hidden = ['deleted_at', 'password'];
|
|
|
|
protected array $casts = [
|
|
'created_at' => 'datetime:Y-m-d H:i:s',
|
|
'updated_at' => 'datetime:Y-m-d H:i:s',
|
|
'active_status' => 'boolean',
|
|
];
|
|
}
|