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
+16 -16
View File
@@ -1,16 +1,16 @@
<?php
declare(strict_types=1);
namespace app\common\model;
/**
* 物流查询日志模型
*/
class ExpressQueryLog extends BaseModel
{
protected $name = 'express_query_log';
// 表只有 create_time、无 update_timeconfig/database.php 全局 auto_timestamp=true,需显式关闭避免 Unknown column 'update_time'
protected $autoWriteTimestamp = false;
}
<?php
declare(strict_types=1);
namespace app\common\model;
/**
* 物流查询日志模型
*/
class ExpressQueryLog extends BaseModel
{
protected $name = 'express_query_log';
// 表只有 create_time、无 update_timeconfig/database.php 全局 auto_timestamp=true,需显式关闭避免 Unknown column 'update_time'
protected $autoWriteTimestamp = false;
}
+24 -24
View File
@@ -1,24 +1,24 @@
<?php
declare(strict_types=1);
namespace app\common\model;
/**
* 物流状态变更记录模型
*/
class ExpressStateLog extends BaseModel
{
protected $name = 'express_state_log';
// 表只有 create_time、无 update_timeconfig/database.php 全局 auto_timestamp=true,需显式关闭避免 Unknown column 'update_time'
protected $autoWriteTimestamp = false;
/**
* 关联主表
*/
public function tracking()
{
return $this->belongsTo(ExpressTracking::class, 'tracking_id', 'id');
}
}
<?php
declare(strict_types=1);
namespace app\common\model;
/**
* 物流状态变更记录模型
*/
class ExpressStateLog extends BaseModel
{
protected $name = 'express_state_log';
// 表只有 create_time、无 update_timeconfig/database.php 全局 auto_timestamp=true,需显式关闭避免 Unknown column 'update_time'
protected $autoWriteTimestamp = false;
/**
* 关联主表
*/
public function tracking()
{
return $this->belongsTo(ExpressTracking::class, 'tracking_id', 'id');
}
}
+24 -24
View File
@@ -1,24 +1,24 @@
<?php
declare(strict_types=1);
namespace app\common\model;
/**
* 物流轨迹明细模型
*/
class ExpressTrace extends BaseModel
{
protected $name = 'express_trace';
// 表只有 create_time、无 update_timeconfig/database.php 全局 auto_timestamp=true,需显式关闭避免 Unknown column 'update_time'
protected $autoWriteTimestamp = false;
/**
* 关联主表
*/
public function tracking()
{
return $this->belongsTo(ExpressTracking::class, 'tracking_id', 'id');
}
}
<?php
declare(strict_types=1);
namespace app\common\model;
/**
* 物流轨迹明细模型
*/
class ExpressTrace extends BaseModel
{
protected $name = 'express_trace';
// 表只有 create_time、无 update_timeconfig/database.php 全局 auto_timestamp=true,需显式关闭避免 Unknown column 'update_time'
protected $autoWriteTimestamp = false;
/**
* 关联主表
*/
public function tracking()
{
return $this->belongsTo(ExpressTracking::class, 'tracking_id', 'id');
}
}
+33 -33
View File
@@ -1,33 +1,33 @@
<?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',
'type' => 'string',
'gid' => 'string',
'remark' => 'string',
'create_time' => 'int',
'update_time' => 'int',
'delete_time' => 'int',
];
}
<?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',
'type' => 'string',
'gid' => 'string',
'remark' => 'string',
'create_time' => 'int',
'update_time' => 'int',
'delete_time' => 'int',
];
}
+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;
}