更新
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\doctor;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
/**
|
||||
* 药品库模型
|
||||
*/
|
||||
class Medicine extends BaseModel
|
||||
{
|
||||
protected $name = 'doctor_medicine';
|
||||
|
||||
// 设置字段信息
|
||||
protected $schema = [
|
||||
'id' => 'int',
|
||||
'name' => 'string',
|
||||
'name_pinyin_abbr' => 'string',
|
||||
'supplier' => 'string',
|
||||
'unit' => 'string',
|
||||
'settlement_price' => 'float',
|
||||
'retail_price' => 'float',
|
||||
'stock' => 'int',
|
||||
'image' => 'string',
|
||||
'status' => 'int',
|
||||
'remark' => 'string',
|
||||
'create_time' => 'int',
|
||||
'update_time' => 'int',
|
||||
'delete_time' => 'int',
|
||||
];
|
||||
}
|
||||
@@ -47,7 +47,22 @@ class Roster extends BaseModel
|
||||
*/
|
||||
public function getPeriodDescAttr($value, $data)
|
||||
{
|
||||
return $data['period'] == 'morning' ? '上午' : '下午';
|
||||
$st = $data['start_time'] ?? '';
|
||||
$et = $data['end_time'] ?? '';
|
||||
if ($st !== '' && $et !== '') {
|
||||
return $st . '-' . $et;
|
||||
}
|
||||
if (($data['period'] ?? '') === 'morning') {
|
||||
return '上午';
|
||||
}
|
||||
if (($data['period'] ?? '') === 'afternoon') {
|
||||
return '下午';
|
||||
}
|
||||
if (($data['period'] ?? '') === 'night') {
|
||||
return '夜班';
|
||||
}
|
||||
|
||||
return '时段';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\tcm;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
/**
|
||||
* 诊单 IM 聊天记录归档
|
||||
*/
|
||||
class ImChatMessage extends BaseModel
|
||||
{
|
||||
protected $name = 'tcm_im_chat_message';
|
||||
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
protected $dateFormat = false;
|
||||
}
|
||||
Reference in New Issue
Block a user