新增功能
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?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'];
|
||||
protected $jsonAssoc = true;
|
||||
|
||||
public function getGenderDescAttr($value, $data)
|
||||
{
|
||||
return ($data['gender'] ?? 0) == 1 ? '男' : '女';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user