44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Model;
|
|
|
|
|
|
|
|
use Hyperf\Snowflake\Concern\Snowflake;
|
|
|
|
/**
|
|
* @property int $system_config_id 主键id
|
|
* @property int $is_auto_phar_verify_prescription 药师是否自动审核处方(0:否 1:是)
|
|
* @property \Carbon\Carbon $created_at 创建时间
|
|
* @property \Carbon\Carbon $updated_at 修改时间
|
|
*/
|
|
class SystemConfig extends Model
|
|
{
|
|
use Snowflake;
|
|
|
|
/**
|
|
* The table associated with the model.
|
|
*/
|
|
protected ?string $table = 'system_config';
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected array $fillable = ['system_config_id', 'is_auto_phar_verify_prescription', 'created_at', 'updated_at'];
|
|
|
|
protected string $primaryKey = "system_config_id";
|
|
|
|
/**
|
|
* 获取信息-单条
|
|
* @param array $params
|
|
* @param array $fields
|
|
* @return object|null
|
|
*/
|
|
public static function getOne(array $params, array $fields = ['*']): object|null
|
|
{
|
|
return self::where($params)->first($fields);
|
|
}
|
|
}
|