Initial commit: 小众厨房项目代码

Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
可乐加冰
2026-09-23 17:04:10 +08:00
当前提交 f7d3d7d1bd
共有 1761 个文件被更改,包括 453668 次插入 和 0 次删除

查看文件

@@ -0,0 +1,40 @@
<?php
namespace app\admin\model\shopro\dispatch;
use think\Model;
use traits\model\SoftDelete;
class Dispatch extends Model
{
use SoftDelete;
// 表名
protected $name = 'shopro_dispatch';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'type_text',
];
public function getTypeList()
{
return ['express' => __('Type express'), 'selfetch' => __('Type selfetch'), 'store' => __('Type store'), 'autosend' => __('Type autosend')];
}
public function getTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['type']) ? $data['type'] : '');
$list = $this->getTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
}