hospital-applets-api/app/Model/SystemInquiryConfig.php
2023-02-17 17:10:16 +08:00

68 lines
2.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\Database\Model\Collection;
use Hyperf\Snowflake\Concern\Snowflake;
/**
* @property int $system_inquiry_config_id 主键id
* @property int $inquiry_type 接诊类型1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药)
* @property int $inquiry_mode 接诊方式1:图文 2:视频 3:语音 4:电话 5:会员)
* @property int $max_work_num_day 每日最大接诊数量为0表示不限制接诊数量
* @property string $inquiry_price 接诊价格(存在多档次,逗号分隔)
* @property string $min_inquiry_price 最低接诊价格(专家问诊)
* @property string $max_inquiry_price 最高接诊价格(专家问诊)
* @property int $times_number 沟通次数0为不限制次数
* @property int $duration 沟通时长分钟0为不限制时长
* @property \Carbon\Carbon $created_at 创建时间
* @property \Carbon\Carbon $updated_at 修改时间
*/
class SystemInquiryConfig extends Model
{
use Snowflake;
/**
* The table associated with the model.
*/
protected ?string $table = 'system_inquiry_config';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['system_inquiry_config_id', 'inquiry_type', 'inquiry_mode', 'max_work_num_day', 'inquiry_price', 'min_inquiry_price', 'max_inquiry_price', 'times_number', 'duration', 'created_at', 'updated_at'];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['system_inquiry_config_id' => 'integer', 'inquiry_type' => 'integer', 'inquiry_mode' => 'integer', 'max_work_num_day' => 'integer', 'times_number' => 'integer', 'duration' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
protected string $primaryKey = "system_inquiry_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);
}
/**
* 获取数据-多
* @param array $params
* @param array $fields
* @return Collection|array
*/
public static function getList(array $params = [], array $fields = ['*']): Collection|array
{
return self::where($params)->get($fields);
}
}