修改数据类型

This commit is contained in:
wucongxing 2023-02-24 13:36:40 +08:00
parent 5b3baaec5d
commit 4ece6b84dd
3 changed files with 74 additions and 1 deletions

38
app/Model/BasicWord.php Normal file
View File

@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\Snowflake\Concern\Snowflake;
/**
* @property int $basics_words_id 主键id
* @property int $basics_words_type 类型1:图文问诊 2:开具处方 3:问诊结束)
* @property int $basics_words_status 状态0:禁用 1:正常)
* @property int $sort 排序值(越大排序越靠前)
* @property string $basics_words 回复语
* @property \Carbon\Carbon $created_at 创建时间
* @property \Carbon\Carbon $updated_at 修改时间
*/
class BasicWord extends Model
{
use Snowflake;
/**
* The table associated with the model.
*/
protected ?string $table = 'basic_words';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['basics_words_id', 'basics_words_type', 'basics_words_status', 'sort', 'basics_words', 'created_at', 'updated_at'];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['basics_words_id' => 'integer', 'basics_words_type' => 'integer', 'basics_words_status' => 'integer', 'sort' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}

35
app/Model/DoctorWord.php Normal file
View File

@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
namespace App\Model;
/**
* @property int $doctor_words_id 主键id
* @property int $doctor_id 医生id
* @property int $words_type 类型1:图文问诊 2:开具处方)
* @property int $words_status 状态0:禁用 1:启用)
* @property int $sort 排序值(越大排序越靠前)
* @property string $words 常用语
* @property \Carbon\Carbon $created_at 创建时间
* @property \Carbon\Carbon $updated_at 修改时间
*/
class DoctorWord extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'doctor_words';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['doctor_words_id', 'doctor_id', 'words_type', 'words_status', 'sort', 'words', 'created_at', 'updated_at'];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['doctor_words_id' => 'integer', 'doctor_id' => 'integer', 'words_type' => 'integer', 'words_status' => 'integer', 'sort' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}

View File

@ -74,7 +74,7 @@ class UserDoctor extends Model
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['doctor_id' => 'integer', 'user_id' => 'integer', 'status' => 'integer', 'idcard_status' => 'integer', 'iden_auth_status' => 'integer', 'multi_point_status' => 'integer', 'is_bind_bank' => 'integer', 'is_recommend' => 'integer', 'sex' => 'integer', 'age' => 'integer', 'doctor_title' => 'integer', 'department_custom_id' => 'integer', 'hospital_id' => 'integer', 'served_patients_num' => 'integer', 'number_of_fans' => 'integer', 'is_online' => 'integer', 'is_img_expert_reception' => 'integer', 'is_img_welfare_reception' => 'integer', 'is_img_quick_reception' => 'integer', 'is_platform_deep_cooperation' => 'integer', 'is_enterprise_deep_cooperation' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
protected array $casts = ['doctor_id' => 'string', 'user_id' => 'string', 'status' => 'integer', 'idcard_status' => 'integer', 'iden_auth_status' => 'integer', 'multi_point_status' => 'integer', 'is_bind_bank' => 'integer', 'is_recommend' => 'integer', 'sex' => 'integer', 'age' => 'integer', 'doctor_title' => 'integer', 'department_custom_id' => 'string', 'hospital_id' => 'string', 'served_patients_num' => 'integer', 'number_of_fans' => 'integer', 'is_online' => 'integer', 'is_img_expert_reception' => 'integer', 'is_img_welfare_reception' => 'integer', 'is_img_quick_reception' => 'integer', 'is_platform_deep_cooperation' => 'integer', 'is_enterprise_deep_cooperation' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
protected string $primaryKey = "doctor_id";