feat: 产品相关接口
This commit is contained in:
43
app/common/model/ProductBaseModel.php
Normal file
43
app/common/model/ProductBaseModel.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
/**
|
||||
* 产品spu模型
|
||||
* @mixin \think\Model
|
||||
*/
|
||||
class ProductBaseModel extends BaseModel
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'product';
|
||||
|
||||
// 主键
|
||||
protected $pk = 'id';
|
||||
|
||||
// 字段信息
|
||||
protected $schema = [
|
||||
'id' => 'int',
|
||||
'language_id' => 'int',
|
||||
'category_id' => 'int',
|
||||
'spu' => 'string',
|
||||
'name' => 'string',
|
||||
'short_name' => 'string',
|
||||
'cover_image' => 'string',
|
||||
'desc' => 'string',
|
||||
'video_img' => 'string',
|
||||
'video_url' => 'string',
|
||||
'is_sale' => 'int',
|
||||
'is_new' => 'int',
|
||||
'is_hot' => 'int',
|
||||
'sort' => 'int',
|
||||
'detail' => 'string',
|
||||
'status' => 'int',
|
||||
'seo_title' => 'string',
|
||||
'seo_keywords' => 'string',
|
||||
'seo_desc' => 'string',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime'
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user