mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
feat: 发布智能体版
This commit is contained in:
@@ -2,12 +2,10 @@
|
||||
|
||||
namespace app\admin\controller\system;
|
||||
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use base\admin\controller\system\ConfigBase;
|
||||
|
||||
/**
|
||||
* Class Config.
|
||||
* @ControllerAnnotation(title="系统配置管理",module="系统")
|
||||
*/
|
||||
class Config extends ConfigBase
|
||||
{
|
||||
|
||||
@@ -7,3 +7,4 @@ use base\admin\model\SystemConfigBase;
|
||||
class SystemConfig extends SystemConfigBase
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_mall_cate', comment: '')]
|
||||
#[Table(name: 'ul_mall_cate', comment: '商品分类')]
|
||||
#[Index(columns: ['title'], name: 'title', type: 'NORMAL')]
|
||||
#[Index(columns: ['delete_time'], name: 'delete_time', type: 'NORMAL')]
|
||||
class MallCate extends BaseScheme
|
||||
@@ -23,7 +23,7 @@ class MallCate extends BaseScheme
|
||||
#[Component(type: 'image', options: [])]
|
||||
public $image;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '排序')]
|
||||
#[Field(type: 'int', length: 11, default: '100', comment: '排序')]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '2', comment: '状态')]
|
||||
|
||||
@@ -8,7 +8,7 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_mall_goods', comment: '')]
|
||||
#[Table(name: 'ul_mall_goods', comment: '商品列表')]
|
||||
#[Index(columns: ['cate_id'], name: 'cate_id', type: 'NORMAL')]
|
||||
#[Index(columns: ['delete_time'], name: 'delete_time', type: 'NORMAL')]
|
||||
class MallGoods extends BaseScheme
|
||||
@@ -25,7 +25,7 @@ class MallGoods extends BaseScheme
|
||||
#[Field(type: 'char', length: 100, precision: 100, default: '', comment: '商品标签')]
|
||||
public $tag;
|
||||
|
||||
#[Field(type: 'char', length: 255, precision: 255, comment: '商品logo')]
|
||||
#[Field(type: 'char', length: 255, precision: 255, default: '', comment: '商品logo')]
|
||||
#[Component(type: 'image', options: [])]
|
||||
public $logo;
|
||||
|
||||
@@ -40,10 +40,10 @@ class MallGoods extends BaseScheme
|
||||
#[Field(type: 'text', comment: '商品属性')]
|
||||
public $property;
|
||||
|
||||
#[Field(type: 'decimal', length: 8, precision: 8, default: '0', comment: '市场价')]
|
||||
#[Field(type: 'decimal', length: 8, precision: 8, scale: 2, default: '0.00', comment: '市场价')]
|
||||
public $market_price;
|
||||
|
||||
#[Field(type: 'decimal', length: 8, precision: 8, default: '0', comment: '折扣价')]
|
||||
#[Field(type: 'decimal', length: 8, precision: 8, scale: 2, default: '0.00', comment: '折扣价')]
|
||||
public $discount_price;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '销量', unsigned: true)]
|
||||
@@ -58,7 +58,7 @@ class MallGoods extends BaseScheme
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '总库存', unsigned: true)]
|
||||
public $total_stock;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '排序', unsigned: true)]
|
||||
#[Field(type: 'int', length: 11, default: '100', comment: '排序', unsigned: true)]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '状态', unsigned: true)]
|
||||
@@ -77,10 +77,10 @@ class MallGoods extends BaseScheme
|
||||
#[Field(type: 'int', length: 11, default: '0', unsigned: true)]
|
||||
public $delete_time;
|
||||
|
||||
#[Field(length: 300, precision: 300, nullable: false, default: '')]
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '')]
|
||||
public $license;
|
||||
|
||||
#[Field(length: 300, precision: 300, nullable: false, default: '')]
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '')]
|
||||
public $license_name;
|
||||
|
||||
#[Field(type: 'text', comment: '属性(静态字段)')]
|
||||
|
||||
@@ -8,7 +8,7 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_mall_tag', comment: '')]
|
||||
#[Table(name: 'ul_mall_tag', comment: '商品标签')]
|
||||
#[Index(columns: ['delete_time'], name: 'delete_time', type: 'NORMAL')]
|
||||
class MallTag extends BaseScheme
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_system_admin', comment: '')]
|
||||
#[Table(name: 'ul_system_admin', comment: '系统用户表')]
|
||||
#[Index(columns: ['username'], name: 'username', type: 'NORMAL')]
|
||||
#[Index(columns: ['phone'], name: 'phone', type: 'NORMAL')]
|
||||
#[Index(columns: ['delete_time'], name: 'delete_time', type: 'NORMAL')]
|
||||
@@ -38,7 +38,7 @@ class SystemAdmin extends BaseScheme
|
||||
#[Field(type: 'bigint', length: 11, default: '0', comment: '登录次数', unsigned: true)]
|
||||
public $login_num;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '排序')]
|
||||
#[Field(type: 'int', length: 11, default: '100', comment: '排序')]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '1', comment: '状态', unsigned: true)]
|
||||
|
||||
@@ -8,9 +8,8 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_system_auth', comment: '')]
|
||||
#[Table(name: 'ul_system_auth', comment: '系统权限表')]
|
||||
#[Index(columns: ['title'], name: 'title', type: 'UNIQUE')]
|
||||
#[Index(columns: ['title'], name: 'title_2', type: 'NORMAL')]
|
||||
#[Index(columns: ['delete_time'], name: 'delete_time', type: 'NORMAL')]
|
||||
class SystemAuth extends BaseScheme
|
||||
{
|
||||
@@ -20,7 +19,7 @@ class SystemAuth extends BaseScheme
|
||||
#[Field(type: 'char', length: 20, precision: 20, comment: '权限名称')]
|
||||
public $title;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '排序')]
|
||||
#[Field(type: 'int', length: 11, default: '100', comment: '排序')]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '状态')]
|
||||
|
||||
@@ -8,9 +8,8 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_system_auth_node', comment: '')]
|
||||
#[Table(name: 'ul_system_auth_node', comment: '角色与节点关系表')]
|
||||
#[Index(columns: ['auth_id'], name: 'auth_id', type: 'NORMAL')]
|
||||
#[Index(columns: ['node_id'], name: 'node_id', type: 'NORMAL')]
|
||||
class SystemAuthNode extends BaseScheme
|
||||
{
|
||||
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, autoIncrement: true, primary: true)]
|
||||
@@ -19,9 +18,6 @@ class SystemAuthNode extends BaseScheme
|
||||
#[Field(type: 'bigint', length: 11, comment: '角色ID', unsigned: true)]
|
||||
public $auth_id;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, comment: '节点ID', unsigned: true)]
|
||||
public $node_id;
|
||||
|
||||
#[Field(type: 'char', length: 100, precision: 100, default: '')]
|
||||
public $node;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_system_config', comment: '')]
|
||||
#[Table(name: 'ul_system_config', comment: '系统配置表')]
|
||||
#[Index(columns: ['name'], name: 'name', type: 'NORMAL')]
|
||||
#[Index(columns: ['group'], name: 'group', type: 'NORMAL')]
|
||||
class SystemConfig extends BaseScheme
|
||||
@@ -28,7 +28,7 @@ class SystemConfig extends BaseScheme
|
||||
#[Field(type: 'char', length: 100, precision: 100, default: '', comment: '备注信息')]
|
||||
public $remark;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '排序')]
|
||||
#[Field(type: 'int', length: 11, default: '100', comment: '排序')]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '创建时间', unsigned: true)]
|
||||
|
||||
65
app/admin/scheme/SystemHost.php
Normal file
65
app/admin/scheme/SystemHost.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\scheme;
|
||||
|
||||
use app\common\scheme\BaseScheme;
|
||||
use app\common\scheme\attribute\Table;
|
||||
use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_system_host', comment: '系统节点表')]
|
||||
#[Index(columns: ['node_id'], name: 'node_id', type: 'UNIQUE')]
|
||||
class SystemHost extends BaseScheme
|
||||
{
|
||||
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, autoIncrement: true, primary: true)]
|
||||
public $id;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, comment: '节点ID')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $node_id;
|
||||
|
||||
#[Field(length: 45, precision: 45, comment: 'IP地址')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $ip_address;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '1', comment: '状态')]
|
||||
#[Component(type: 'switch', options: ['离线', '在线'])]
|
||||
public $status;
|
||||
|
||||
#[Field(type: 'datetime', comment: '最后心跳时间')]
|
||||
#[Component(type: 'date', options: [])]
|
||||
public $last_heartbeat_at;
|
||||
|
||||
#[Field(length: 255, precision: 255, comment: '系统信息')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $os_info;
|
||||
|
||||
#[Field(length: 50, precision: 50, comment: 'PHP版本')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $php_version;
|
||||
|
||||
#[Field(length: 50, precision: 50, comment: 'CPU负载')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $cpu_load;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, comment: '内存占用(byte)')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $memory_usage;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, comment: '磁盘可用空间(byte)')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $disk_free;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, comment: '磁盘总空间(byte)')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $disk_total;
|
||||
|
||||
#[Field(type: 'int', length: 11, comment: '首次运行时间', unsigned: true)]
|
||||
#[Component(type: 'date', options: [])]
|
||||
public $create_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, comment: '更新时间', unsigned: true)]
|
||||
#[Component(type: 'date', options: [])]
|
||||
public $update_time;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_system_menu', comment: '')]
|
||||
#[Table(name: 'ul_system_menu', comment: '系统菜单表')]
|
||||
#[Index(columns: ['title'], name: 'title', type: 'NORMAL')]
|
||||
#[Index(columns: ['href'], name: 'href', type: 'NORMAL')]
|
||||
#[Index(columns: ['delete_time'], name: 'delete_time', type: 'NORMAL')]
|
||||
@@ -38,7 +38,7 @@ class SystemMenu extends BaseScheme
|
||||
#[Field(type: 'char', length: 20, precision: 20, default: '_self', comment: '链接打开方式')]
|
||||
public $target;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '排序')]
|
||||
#[Field(type: 'int', length: 11, default: '100', comment: '排序')]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '1', comment: '状态')]
|
||||
|
||||
@@ -8,7 +8,7 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_system_quick', comment: '')]
|
||||
#[Table(name: 'ul_system_quick', comment: '系统快捷入口表')]
|
||||
#[Index(columns: ['delete_time'], name: 'delete_time', type: 'NORMAL')]
|
||||
class SystemQuick extends BaseScheme
|
||||
{
|
||||
@@ -24,7 +24,7 @@ class SystemQuick extends BaseScheme
|
||||
#[Field(type: 'char', length: 255, precision: 255, comment: '快捷链接')]
|
||||
public $href;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', comment: '排序')]
|
||||
#[Field(type: 'int', length: 11, default: '100', comment: '排序')]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '1', comment: '状态', unsigned: true)]
|
||||
|
||||
@@ -8,7 +8,7 @@ use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_system_uploadfile', comment: '')]
|
||||
#[Table(name: 'ul_system_uploadfile', comment: '上传文件表')]
|
||||
#[Index(columns: ['upload_type'], name: 'upload_type', type: 'NORMAL')]
|
||||
#[Index(columns: ['original_name'], name: 'original_name', type: 'NORMAL')]
|
||||
#[Index(columns: ['delete_time'], name: 'delete_time', type: 'NORMAL')]
|
||||
|
||||
121
app/admin/scheme/TestGoods.php
Normal file
121
app/admin/scheme/TestGoods.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\scheme;
|
||||
|
||||
use app\common\scheme\BaseScheme;
|
||||
use app\common\scheme\attribute\Table;
|
||||
use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_test_goods', comment: '商品列表')]
|
||||
#[Index(columns: ['uid'], name: 'uid', type: 'UNIQUE')]
|
||||
#[Index(columns: ['cate_id'], name: 'cate_id', type: 'NORMAL')]
|
||||
#[Index(columns: ['detail'], name: 'detail', type: 'FULLTEXT')]
|
||||
class TestGoods extends BaseScheme
|
||||
{
|
||||
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, autoIncrement: true, primary: true)]
|
||||
public $id;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, nullable: false, default: '0', comment: '分类ID', unsigned: true)]
|
||||
#[Component(type: 'relation', options: ['table' => 'mall_cate', 'relationBindSelect' => 'title'])]
|
||||
public $cate_id;
|
||||
|
||||
#[Field(type: 'char', length: 20, precision: 20, nullable: false, default: '', comment: '商品名称')]
|
||||
public $title;
|
||||
|
||||
#[Field(type: 'char', length: 255, precision: 255, nullable: false, comment: '商品logo')]
|
||||
#[Component(type: 'image', options: [])]
|
||||
public $logo;
|
||||
|
||||
#[Field(type: 'text', nullable: false, comment: '商品图片')]
|
||||
#[Component(type: 'images', options: [])]
|
||||
public $images;
|
||||
|
||||
#[Field(type: 'text', nullable: false, comment: '商品描述')]
|
||||
#[Component(type: 'editor', options: [])]
|
||||
public $describe;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '总库存', unsigned: true)]
|
||||
public $total_stock;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '100', comment: '排序', unsigned: true)]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '状态', unsigned: true)]
|
||||
#[Component(type: 'radio', options: ['正常', '禁用'])]
|
||||
public $status;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, comment: '合格证')]
|
||||
#[Component(type: 'file', options: [])]
|
||||
public $cert_file;
|
||||
|
||||
#[Field(type: 'text', nullable: false, comment: '检测报告')]
|
||||
#[Component(type: 'files', options: [])]
|
||||
public $verfiy_file;
|
||||
|
||||
#[Field(type: 'char', length: 255, precision: 255, nullable: false, default: '', comment: '备注说明')]
|
||||
public $remark;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $create_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $update_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $delete_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, comment: '发布日期', unsigned: true)]
|
||||
#[Component(type: 'date', options: ['date'])]
|
||||
public $publish_time;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, nullable: false, comment: '售卖日期', unsigned: true)]
|
||||
#[Component(type: 'date', options: ['datetime'])]
|
||||
public $sale_time;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, comment: '简介')]
|
||||
#[Component(type: 'textarea', options: [])]
|
||||
public $intro;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, comment: '秒杀状态', unsigned: true)]
|
||||
#[Component(type: 'select', options: [0 => '未参加', 1 => '已开始', 3 => '已结束'])]
|
||||
public $time_status;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, comment: '是否推荐')]
|
||||
#[Component(type: 'switch', options: ['不推荐', '推荐'])]
|
||||
public $is_recommend;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, comment: '商品类型')]
|
||||
#[Component(type: 'checkbox', options: ['taobao' => '淘宝', 'jd' => '京东'])]
|
||||
public $shop_type;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, comment: '商品标签')]
|
||||
#[Component(type: 'table', options: ['table' => 'mall_tag', 'type' => 'checkbox', 'valueField' => 'id', 'fieldName' => 'title'])]
|
||||
public $tag;
|
||||
|
||||
#[Field(length: 100, precision: 100, comment: '商品标签(单选)')]
|
||||
#[Component(type: 'table', options: ['table' => 'mall_tag', 'type' => 'radio', 'valueField' => 'id', 'fieldName' => 'title'])]
|
||||
public $tag_backup;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, comment: '产地')]
|
||||
#[Component(type: 'city', options: ['name-province' => '0', 'code' => '0'])]
|
||||
public $from_area;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '山东省/临沂市', comment: '仓库')]
|
||||
#[Component(type: 'city', options: ['level' => 'city'])]
|
||||
public $store_city;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, comment: '商品标签 (输入)')]
|
||||
#[Component(type: 'tag', options: [])]
|
||||
public $tag_input;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, comment: '唯一id')]
|
||||
public $uid;
|
||||
|
||||
#[Field(type: 'decimal', length: 10, precision: 10, scale: 2, comment: '价格')]
|
||||
public $price;
|
||||
|
||||
#[Field(type: 'text', comment: '详情')]
|
||||
public $detail;
|
||||
}
|
||||
55
app/admin/scheme/TreeTree.php
Normal file
55
app/admin/scheme/TreeTree.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\scheme;
|
||||
|
||||
use app\common\scheme\BaseScheme;
|
||||
use app\common\scheme\attribute\Table;
|
||||
use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_tree_tree', comment: '')]
|
||||
#[Index(columns: ['path'], name: 'ul_tree_tree_path_IDX', type: 'NORMAL')]
|
||||
#[Index(columns: ['pid'], name: 'ul_tree_tree_pid_IDX', type: 'NORMAL')]
|
||||
#[Index(columns: ['title'], name: 'ul_tree_tree_title_IDX', type: 'NORMAL')]
|
||||
class TreeTree extends BaseScheme
|
||||
{
|
||||
#[Field(type: 'int', length: 11, nullable: false, comment: 'ID', autoIncrement: true, primary: true)]
|
||||
public $id;
|
||||
|
||||
#[Field(length: 255, precision: 255, nullable: false, default: '', comment: '分类名称')]
|
||||
#[Component(type: 'text', options: [])]
|
||||
public $title;
|
||||
|
||||
#[Field(type: 'int', length: 11, comment: '父级ID')]
|
||||
public $pid;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '1', comment: '分类层级')]
|
||||
public $level;
|
||||
|
||||
#[Field(length: 255, precision: 255, nullable: false, comment: '分类路径')]
|
||||
public $path;
|
||||
|
||||
#[Field(length: 50, precision: 50, nullable: false, default: 'default', comment: '类型')]
|
||||
public $type;
|
||||
|
||||
#[Field(type: 'tinyint', length: 11, nullable: false, default: '1', comment: '状态')]
|
||||
#[Component(type: 'switch', options: ['禁用', '启用'])]
|
||||
public $status;
|
||||
|
||||
#[Field(length: 255, precision: 255, default: '', comment: '分类图片')]
|
||||
#[Component(type: 'image', options: [])]
|
||||
public $image;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '创建时间', unsigned: true)]
|
||||
public $create_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '更新时间', unsigned: true)]
|
||||
public $update_time;
|
||||
|
||||
#[Field(length: 100, precision: 100, comment: '备注')]
|
||||
public $comment;
|
||||
|
||||
#[Field(type: 'int', length: 11, default: '0', unsigned: true)]
|
||||
public $delete_time;
|
||||
}
|
||||
120
app/admin/scheme/UlthonDemoGoods.php
Normal file
120
app/admin/scheme/UlthonDemoGoods.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\scheme;
|
||||
|
||||
use app\common\scheme\BaseScheme;
|
||||
use app\common\scheme\attribute\Table;
|
||||
use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_ulthon_demo_goods', comment: '')]
|
||||
#[Index(columns: ['cate_id'], name: 'cate_id', type: 'NORMAL')]
|
||||
#[Index(columns: ['detail'], name: 'detail', type: 'FULLTEXT')]
|
||||
class UlthonDemoGoods extends BaseScheme
|
||||
{
|
||||
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, autoIncrement: true, primary: true)]
|
||||
public $id;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, nullable: false, default: '0', comment: '分类ID', unsigned: true)]
|
||||
#[Component(type: 'relation', options: ['table' => 'mall_cate', 'relationBindSelect' => 'title'])]
|
||||
public $cate_id;
|
||||
|
||||
#[Field(type: 'char', length: 20, precision: 20, nullable: false, default: '', comment: '商品名称')]
|
||||
public $title;
|
||||
|
||||
#[Field(type: 'char', length: 255, precision: 255, nullable: false, comment: '商品logo')]
|
||||
#[Component(type: 'image', options: [])]
|
||||
public $logo;
|
||||
|
||||
#[Field(type: 'text', comment: '商品图片')]
|
||||
#[Component(type: 'images', options: [])]
|
||||
public $images;
|
||||
|
||||
#[Field(type: 'text', comment: '商品描述')]
|
||||
#[Component(type: 'editor', options: [])]
|
||||
public $describe;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '总库存', unsigned: true)]
|
||||
public $total_stock;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '排序', unsigned: true)]
|
||||
public $sort;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '状态', unsigned: true)]
|
||||
#[Component(type: 'radio', options: ['正常', '禁用'])]
|
||||
public $status;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '', comment: '合格证')]
|
||||
#[Component(type: 'file', options: [])]
|
||||
public $cert_file;
|
||||
|
||||
#[Field(type: 'text', comment: '检测报告')]
|
||||
#[Component(type: 'files', options: [])]
|
||||
public $verfiy_file;
|
||||
|
||||
#[Field(type: 'char', length: 255, precision: 255, nullable: false, default: '', comment: '备注说明')]
|
||||
public $remark;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $create_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $update_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $delete_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, comment: '发布日期', unsigned: true)]
|
||||
#[Component(type: 'date', options: ['date'])]
|
||||
public $publish_time;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, nullable: false, default: '0', comment: '售卖日期', unsigned: true)]
|
||||
#[Component(type: 'date', options: ['datetime'])]
|
||||
public $sale_time;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '', comment: '简介')]
|
||||
#[Component(type: 'textarea', options: [])]
|
||||
public $intro;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '秒杀状态', unsigned: true)]
|
||||
#[Component(type: 'select', options: [0 => '未参加', 1 => '已开始', 3 => '已结束'])]
|
||||
public $time_status;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '是否推荐')]
|
||||
#[Component(type: 'switch', options: ['不推荐', '推荐'])]
|
||||
public $is_recommend;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '', comment: '商品类型')]
|
||||
#[Component(type: 'checkbox', options: ['taobao' => '淘宝', 'jd' => '京东'])]
|
||||
public $shop_type;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '', comment: '商品标签')]
|
||||
#[Component(type: 'table', options: ['table' => 'mall_tag', 'type' => 'checkbox', 'valueField' => 'id', 'fieldName' => 'title'])]
|
||||
public $tag;
|
||||
|
||||
#[Field(length: 100, precision: 100, default: '', comment: '商品标签(单选)')]
|
||||
#[Component(type: 'table', options: ['table' => 'mall_tag', 'type' => 'radio', 'valueField' => 'id', 'fieldName' => 'title'])]
|
||||
public $tag_backup;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '', comment: '产地')]
|
||||
#[Component(type: 'city', options: ['name-province' => '0', 'code' => '0'])]
|
||||
public $from_area;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '山东省/临沂市', comment: '仓库')]
|
||||
#[Component(type: 'city', options: ['level' => 'city'])]
|
||||
public $store_city;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '', comment: '商品标签 (输入)')]
|
||||
#[Component(type: 'tag', options: [])]
|
||||
public $tag_input;
|
||||
|
||||
#[Field(length: 100, precision: 100, nullable: false, default: '', comment: '唯一id')]
|
||||
public $uid;
|
||||
|
||||
#[Field(type: 'decimal', length: 10, precision: 10, default: '0', comment: '价格')]
|
||||
public $price;
|
||||
|
||||
#[Field(type: 'text', comment: '详情')]
|
||||
public $detail;
|
||||
}
|
||||
52
app/admin/scheme/UlthonDemoGoodsBatch.php
Normal file
52
app/admin/scheme/UlthonDemoGoodsBatch.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\scheme;
|
||||
|
||||
use app\common\scheme\BaseScheme;
|
||||
use app\common\scheme\attribute\Table;
|
||||
use app\common\scheme\attribute\Field;
|
||||
use app\common\scheme\attribute\Component;
|
||||
use app\common\scheme\attribute\Index;
|
||||
|
||||
#[Table(name: 'ul_ulthon_demo_goods_batch', comment: '')]
|
||||
class UlthonDemoGoodsBatch extends BaseScheme
|
||||
{
|
||||
#[Field(type: 'int', length: 11, nullable: false, unsigned: true, autoIncrement: true, primary: true)]
|
||||
public $id;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $create_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $update_time;
|
||||
|
||||
#[Field(type: 'int', length: 11, nullable: false, default: '0', unsigned: true)]
|
||||
public $delete_time;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, unsigned: true)]
|
||||
public $goods_id;
|
||||
|
||||
#[Field(length: 100, precision: 100, default: '', comment: '批次名称')]
|
||||
public $title;
|
||||
|
||||
#[Field(length: 100, precision: 100, default: '', comment: '批次编号')]
|
||||
public $num;
|
||||
|
||||
#[Field(type: 'tinyint', length: 11, default: '1', comment: '状态', unsigned: true)]
|
||||
#[Component(type: 'switch', options: ['关闭', '开启'])]
|
||||
public $status;
|
||||
|
||||
#[Field(length: 100, precision: 100, default: '', comment: '备注')]
|
||||
#[Component(type: 'textarea', options: [])]
|
||||
public $comment;
|
||||
|
||||
#[Field(type: 'bigint', length: 11, default: '0', comment: '库存')]
|
||||
public $stock;
|
||||
|
||||
#[Field(length: 100, precision: 100, comment: '包装')]
|
||||
#[Component(type: 'image', options: [])]
|
||||
public $title_image;
|
||||
|
||||
#[Field(length: 100, precision: 100)]
|
||||
public $add_flag;
|
||||
}
|
||||
14
app/common/command/admin/menu/AdminMenuCreate.php
Normal file
14
app/common/command/admin/menu/AdminMenuCreate.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\menu;
|
||||
|
||||
use base\common\command\admin\menu\AdminMenuCreateBase;
|
||||
|
||||
/**
|
||||
* admin:menu:create command - 创建菜单
|
||||
*/
|
||||
class AdminMenuCreate extends AdminMenuCreateBase
|
||||
{
|
||||
}
|
||||
14
app/common/command/admin/menu/AdminMenuDelete.php
Normal file
14
app/common/command/admin/menu/AdminMenuDelete.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\menu;
|
||||
|
||||
use base\common\command\admin\menu\AdminMenuDeleteBase;
|
||||
|
||||
/**
|
||||
* admin:menu:delete command - 删除菜单
|
||||
*/
|
||||
class AdminMenuDelete extends AdminMenuDeleteBase
|
||||
{
|
||||
}
|
||||
14
app/common/command/admin/menu/AdminMenuExport.php
Normal file
14
app/common/command/admin/menu/AdminMenuExport.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\menu;
|
||||
|
||||
use base\common\command\admin\menu\AdminMenuExportBase;
|
||||
|
||||
/**
|
||||
* admin:menu:export command - 导出菜单
|
||||
*/
|
||||
class AdminMenuExport extends AdminMenuExportBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/menu/AdminMenuList.php
Normal file
11
app/common/command/admin/menu/AdminMenuList.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\menu;
|
||||
|
||||
use base\common\command\admin\menu\AdminMenuListBase;
|
||||
|
||||
class AdminMenuList extends AdminMenuListBase
|
||||
{
|
||||
}
|
||||
14
app/common/command/admin/menu/AdminMenuUpdate.php
Normal file
14
app/common/command/admin/menu/AdminMenuUpdate.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\menu;
|
||||
|
||||
use base\common\command\admin\menu\AdminMenuUpdateBase;
|
||||
|
||||
/**
|
||||
* admin:menu:update command - 编辑菜单
|
||||
*/
|
||||
class AdminMenuUpdate extends AdminMenuUpdateBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/permission/AdminPermissionNodes.php
Normal file
11
app/common/command/admin/permission/AdminPermissionNodes.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\permission;
|
||||
|
||||
use base\common\command\admin\permission\AdminPermissionNodesBase;
|
||||
|
||||
class AdminPermissionNodes extends AdminPermissionNodesBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/permission/PermissionUser.php
Normal file
11
app/common/command/admin/permission/PermissionUser.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\permission;
|
||||
|
||||
use base\common\command\admin\permission\AdminPermissionUserBase;
|
||||
|
||||
class PermissionUser extends AdminPermissionUserBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/role/AdminRoleCreate.php
Normal file
11
app/common/command/admin/role/AdminRoleCreate.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\role;
|
||||
|
||||
use base\common\command\admin\role\AdminRoleCreateBase;
|
||||
|
||||
class AdminRoleCreate extends AdminRoleCreateBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/role/AdminRoleDelete.php
Normal file
11
app/common/command/admin/role/AdminRoleDelete.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\role;
|
||||
|
||||
use base\common\command\admin\role\AdminRoleDeleteBase;
|
||||
|
||||
class AdminRoleDelete extends AdminRoleDeleteBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/role/AdminRoleInfo.php
Normal file
11
app/common/command/admin/role/AdminRoleInfo.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\role;
|
||||
|
||||
use base\common\command\admin\role\AdminRoleInfoBase;
|
||||
|
||||
class AdminRoleInfo extends AdminRoleInfoBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/role/AdminRoleList.php
Normal file
11
app/common/command/admin/role/AdminRoleList.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\role;
|
||||
|
||||
use base\common\command\admin\role\AdminRoleListBase;
|
||||
|
||||
class AdminRoleList extends AdminRoleListBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/role/AdminRolePermissionAssign.php
Normal file
11
app/common/command/admin/role/AdminRolePermissionAssign.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\role;
|
||||
|
||||
use base\common\command\admin\role\AdminRolePermissionAssignBase;
|
||||
|
||||
class AdminRolePermissionAssign extends AdminRolePermissionAssignBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/role/AdminRolePermissionList.php
Normal file
11
app/common/command/admin/role/AdminRolePermissionList.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\role;
|
||||
|
||||
use base\common\command\admin\role\AdminRolePermissionListBase;
|
||||
|
||||
class AdminRolePermissionList extends AdminRolePermissionListBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/role/AdminRolePermissionRevoke.php
Normal file
11
app/common/command/admin/role/AdminRolePermissionRevoke.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\role;
|
||||
|
||||
use base\common\command\admin\role\AdminRolePermissionRevokeBase;
|
||||
|
||||
class AdminRolePermissionRevoke extends AdminRolePermissionRevokeBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/user/AdminUserRoleAssign.php
Normal file
11
app/common/command/admin/user/AdminUserRoleAssign.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\user;
|
||||
|
||||
use base\common\command\admin\user\AdminUserRoleAssignBase;
|
||||
|
||||
class AdminUserRoleAssign extends AdminUserRoleAssignBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/user/AdminUserRoleList.php
Normal file
11
app/common/command/admin/user/AdminUserRoleList.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\user;
|
||||
|
||||
use base\common\command\admin\user\AdminUserRoleListBase;
|
||||
|
||||
class AdminUserRoleList extends AdminUserRoleListBase
|
||||
{
|
||||
}
|
||||
11
app/common/command/admin/user/AdminUserRoleRevoke.php
Normal file
11
app/common/command/admin/user/AdminUserRoleRevoke.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\command\admin\user;
|
||||
|
||||
use base\common\command\admin\user\AdminUserRoleRevokeBase;
|
||||
|
||||
class AdminUserRoleRevoke extends AdminUserRoleRevokeBase
|
||||
{
|
||||
}
|
||||
10
app/common/command/tools/agent/ToolsAgentPublish.php
Normal file
10
app/common/command/tools/agent/ToolsAgentPublish.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\command\tools\agent;
|
||||
|
||||
use base\common\command\tools\agent\ToolsAgentPublishBase;
|
||||
|
||||
class ToolsAgentPublish extends ToolsAgentPublishBase
|
||||
{
|
||||
}
|
||||
|
||||
13
app/common/command/tools/http/ToolsHttpCall.php
Normal file
13
app/common/command/tools/http/ToolsHttpCall.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\command\tools\http;
|
||||
|
||||
use base\common\command\tools\http\ToolsHttpCallBase;
|
||||
|
||||
class ToolsHttpCall extends ToolsHttpCallBase
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
parent::configure();
|
||||
}
|
||||
}
|
||||
9
app/common/command/tools/log/ToolsLogSearch.php
Normal file
9
app/common/command/tools/log/ToolsLogSearch.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\command\tools\log;
|
||||
|
||||
use base\common\command\tools\log\ToolsLogSearchBase;
|
||||
|
||||
class ToolsLogSearch extends ToolsLogSearchBase
|
||||
{
|
||||
}
|
||||
9
app/common/command/tools/log/ToolsLogShow.php
Normal file
9
app/common/command/tools/log/ToolsLogShow.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\command\tools\log;
|
||||
|
||||
use base\common\command\tools\log\ToolsLogShowBase;
|
||||
|
||||
class ToolsLogShow extends ToolsLogShowBase
|
||||
{
|
||||
}
|
||||
9
app/common/command/tools/log/ToolsLogStats.php
Normal file
9
app/common/command/tools/log/ToolsLogStats.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\command\tools\log;
|
||||
|
||||
use base\common\command\tools\log\ToolsLogStatsBase;
|
||||
|
||||
class ToolsLogStats extends ToolsLogStatsBase
|
||||
{
|
||||
}
|
||||
18
app/common/console/Command.php
Normal file
18
app/common/console/Command.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\console;
|
||||
|
||||
use base\common\command\CommandBase;
|
||||
|
||||
/**
|
||||
* Command 命令基类(app 层入口)
|
||||
*
|
||||
* 这是所有命令类使用的 CommandBase 的唯一调用入口。
|
||||
* 对应 ThinkPHP 的 console 目录结构(Input、Output 都在 console 下)
|
||||
*
|
||||
* 所有 extend/base 层的命令应该使用:use app\common\console\Command;
|
||||
*/
|
||||
class Command extends CommandBase
|
||||
{
|
||||
}
|
||||
|
||||
15
app/common/service/tools/DbService.php
Normal file
15
app/common/service/tools/DbService.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\service\tools;
|
||||
|
||||
use base\common\service\tools\DbServiceBase;
|
||||
|
||||
/**
|
||||
* Db 服务类(app 层入口)
|
||||
*
|
||||
* 这是 tools:db 命令使用的数据库工具服务的唯一调用入口。
|
||||
* 空类继承 Base,确保业务层可以在 app/ 中扩展此服务。
|
||||
*/
|
||||
class DbService extends DbServiceBase
|
||||
{
|
||||
}
|
||||
@@ -5,5 +5,6 @@
|
||||
use app\common\provider\Console;
|
||||
|
||||
return [
|
||||
'think\Console'=>Console::class
|
||||
// 注意,必须在此处注册ConsoleProvider,否则命令行控制台无法正常工作
|
||||
'think\Console'=>Console::class
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user