This commit is contained in:
Your Name
2026-08-11 17:39:41 +08:00
parent cfe4c82c90
commit 25467b9d91
350 changed files with 201115 additions and 132208 deletions
+38 -38
View File
@@ -1,38 +1,38 @@
<?php
declare(strict_types=1);
namespace app\common\model\tcm;
use app\common\model\BaseModel;
/**
* 中医处方单模型
*/
class Prescription extends BaseModel
{
protected $name = 'tcm_prescription';
protected $autoWriteTimestamp = true;
protected $createTime = 'create_time';
protected $updateTime = 'update_time';
protected $deleteTime = 'delete_time';
protected $dateFormat = false;
protected $json = ['herbs', 'case_record', 'aux_usage'];
protected $jsonAssoc = true;
// 字段类型转换
protected $type = [
'dosage_amount' => 'float',
'dosage_bag_count' => 'integer',
'need_decoction' => 'integer',
];
// 追加字段
protected $append = ['gender_desc'];
public function getGenderDescAttr($value, $data)
{
return ($data['gender'] ?? 0) == 1 ? '男' : '女';
}
}
<?php
declare(strict_types=1);
namespace app\common\model\tcm;
use app\common\model\BaseModel;
/**
* 中医处方单模型
*/
class Prescription extends BaseModel
{
protected $name = 'tcm_prescription';
protected $autoWriteTimestamp = true;
protected $createTime = 'create_time';
protected $updateTime = 'update_time';
protected $deleteTime = 'delete_time';
protected $dateFormat = false;
protected $json = ['herbs', 'case_record', 'aux_usage'];
protected $jsonAssoc = true;
// 字段类型转换
protected $type = [
'dosage_amount' => 'float',
'dosage_bag_count' => 'integer',
'need_decoction' => 'integer',
];
// 追加字段
protected $append = ['gender_desc'];
public function getGenderDescAttr($value, $data)
{
return ($data['gender'] ?? 0) == 1 ? '男' : '女';
}
}
@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace app\common\model\tcm;
use app\common\model\BaseModel;
/**
* 处方库 AI 解释报告。
*/
class PrescriptionLibraryAiReport extends BaseModel
{
protected $name = 'prescription_library_ai_report';
protected $autoWriteTimestamp = true;
}