Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions app/src/main/resources/sql/h2/create_model_ddl_2025_0717.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
drop table if exists `t_model`;

create table `t_model`
(
`id` int not null auto_increment comment '主键id',
`name_cn` varchar(255) not null comment '中文名称',
`name_en` varchar(255) not null comment '英文名称',
`version` varchar(255) comment '版本',
`model_url` varchar(255) comment '模型url',
`parameters` varchar(2000) not null comment '字段参数',
`method` longtext comment '方法',
`description` varchar(2000) comment '描述',
`created_by` varchar(60) not null comment '创建人',
`created_time` timestamp not null default current_timestamp comment '创建时间',
`last_updated_by` varchar(60) not null comment '最后修改人',
`last_updated_time` timestamp not null default current_timestamp comment '更新时间',
`tenant_id` varchar(60) comment '租户id',
`renter_id` varchar(60) comment '业务租户id',
`site_id` varchar(60) comment '站点id,设计预留字段',
primary key (`id`) using btree,
unique index `u_idx_model` (`name_en`,`version`) using btree
) engine = innodb comment = '模型表';
3 changes: 0 additions & 3 deletions app/src/main/resources/sql/h2/update_all_tables_ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ ALTER TABLE t_platform MODIFY tenant_id varchar(60) NULL;
ALTER TABLE t_platform_history MODIFY tenant_id varchar(60) NULL;
ALTER TABLE t_task_record MODIFY tenant_id varchar(60) NULL;
ALTER TABLE t_user MODIFY tenant_id varchar(60) NULL;

ALTER TABLE t_component_library ADD app_id int NULL;

22 changes: 22 additions & 0 deletions app/src/main/resources/sql/mysql/create_model_ddl_2025_0717.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
drop table if exists `t_model`;

create table `t_model`
(
`id` int not null auto_increment comment '主键id',
`name_cn` varchar(255) not null comment '中文名称',
`name_en` varchar(255) not null comment '英文名称',
`version` varchar(255) comment '版本',
`model_url` varchar(255) comment '模型url',
`parameters` varchar(2000) not null comment '字段参数',
`method` longtext comment '方法',
`description` varchar(2000) comment '描述',
`created_by` varchar(60) not null comment '创建人',
`created_time` timestamp not null default current_timestamp comment '创建时间',
`last_updated_by` varchar(60) not null comment '最后修改人',
`last_updated_time` timestamp not null default current_timestamp comment '更新时间',
`tenant_id` varchar(60) comment '租户id',
`renter_id` varchar(60) comment '业务租户id',
`site_id` varchar(60) comment '站点id,设计预留字段',
primary key (`id`) using btree,
unique index `u_idx_model` (`name_en`,`version`) using btree
) engine = innodb comment = '模型表';
164 changes: 164 additions & 0 deletions base/src/main/java/com/tinyengine/it/common/enums/Enums.java
Original file line number Diff line number Diff line change
Expand Up @@ -1003,4 +1003,168 @@ public String getValue() {
return value;
}
}

public enum methodName {

/**
* CREATED name.
*/
CREATED("新增方法"),

/**
* UPDATE name.
*/
UPDATE("修改方法"),

/**
* DELETE name.
*/
DELETE("删除方法"),

/**
* QUERY name.
*/
QUERY("查询方法"),

/**
* INSERTAPI name.
*/
INSERTAPI("insertApi"),

/**
* UPDATEAPI name.
*/
UPDATEAPI("updateApi"),

/**
* QUERYAPI name.
*/
QUERYAPI("queryApi"),

/**
* INSERTAPI name.
*/
DELETEAPI("deleteApi");

private final String value;

methodName(String value) {
this.value = value;
}

/**
* Gets value.
*
* @return the value
*/
public String getValue() {
return value;
}
}

public enum paramType {

/**
* TYPE name.
*/
OBJECT("Object"),

/**
* TYPE name.
*/
NUMBER("Number"),

/**
* TYPE name.
*/
STRING("String"),

/**
* TYPE name.
*/
ENUM("Enum");

private final String value;

paramType(String value) {
this.value = value;
}

/**
* Gets value.
*
* @return the value
*/
public String getValue() {
return value;
}
}

public enum methodParam {

/**
* ID
*/
ID("id"),
/**
* CURRENTPAGE
*/
CURRENTPAGE("currentPage"),

/**
* PAGESIZE
*/
PAGESIZE("pageSize"),

/**
* NAMECN
*/
NAMECN("nameCn"),

/**
* NAMEEN
*/
NAMEEN("nameEn"),

/**
* PARAMS
*/
PARAMS("params"),

/**
* CODE
*/
CODE("code"),

/**
* MESSAGE
*/
MESSAGE("message"),

/**
* DATA
*/
DATA("data"),

/**
* TOTAL
*/
TOTAL("total");


private final String value;

methodParam(String value) {
this.value = value;
}

/**
* Gets value.
*
* @return the value
*/
public String getValue() {
return value;
}
}
}
Loading
Loading