初始化项目:添加后端代码、ThinkPHP框架、前端资源

This commit is contained in:
amb
2026-09-03 12:42:39 +08:00
commit 482bece22e
3726 changed files with 416708 additions and 0 deletions
@@ -0,0 +1,43 @@
<?php
namespace app\admin\model\app\physical;
use think\Model;
class SkuPrice extends Model
{
protected $name = 'app_physical_sku_price';
protected $autoWriteTimestamp = 'integer';
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
protected $append = [
'status_text'
];
public function getStatusList()
{
return ['0' => '下架', '1' => '上架'];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function goods()
{
return $this->belongsTo('app\admin\model\app\physical\Goods', 'goods_id', 'id');
}
}