获取类型 根据 appTableInfo
diff --git a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/template/tempController.cshtml b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/template/tempController.cshtml
index 7483942..13ec2f9 100644
--- a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/template/tempController.cshtml
+++ b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/template/tempController.cshtml
@@ -6,7 +6,7 @@
using @(Model.Namespace).Api.Admin.ApplicationServices.Apps;
-using @(Model.Namespace).@(Model.DataBase == "MiaoYuChat" ? "Repository.ChatAI.Admin.Entities.Apps;" : "Repository.EntityFramework.Admin.Entities.Apps;");
+using @(Model.Namespace).@(Model.DataBase == "MiaoYuChat" ? "Repository.ChatAI.Admin.Entities.Apps;" : "Repository.EntityFramework.Admin.Entities.Apps;")
namespace @(Model.Namespace).Api.Admin.Controllers.Apps;
///
diff --git a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/template/tempService.cshtml b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/template/tempService.cshtml
index bd3aea1..5702b74 100644
--- a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/template/tempService.cshtml
+++ b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/template/tempService.cshtml
@@ -54,11 +54,19 @@ public class @(className)Service : ApplicationService<@("IRepository")<@(classNa
public async Task<@("PagingView")> FindListAsync(PagingSearchInput<@(className)> pagingSearchInput)
{
var query = this._defaultRepository.Select
- @if (!string.IsNullOrWhiteSpace(searchKeyWord))
- {
- .WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.@(searchKeyWord)), w => w.@(searchKeyWord).Contains(pagingSearchInput.Search.@(searchKeyWord) ?? ""))
- }
- .OrderByDescending(w => w.CreationTime)
+ @if (!string.IsNullOrWhiteSpace(searchKeyWord))
+ {
+ .WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.@(searchKeyWord)), w => w.@(searchKeyWord).Contains(pagingSearchInput.Search.@(searchKeyWord) ?? ""))
+ }
+ @if (!string.IsNullOrWhiteSpace(searchKeyWord))
+ {
+ .OrderByDescending(w => w.Id)
+ }
+ @if (!string.IsNullOrWhiteSpace(searchKeyWord))
+ {
+ .OrderByDescending(w => w.CreationTime)
+ }
+
.Select(w => new
{
w.Id,
@@ -69,13 +77,14 @@ public class @(className)Service : ApplicationService<@("IRepository")<@(classNa
;
var result = await _defaultRepository.AsPagingViewAsync(query, pagingSearchInput);
-
- // 覆盖值
- result
- .FormatValue(query, w => w.CreationTime, (oldValue) => oldValue.ToString("yyyy-MM-dd"))
- .FormatValue(query, w => w.LastModificationTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd"))
- ;
-
+ @if (Model.DataBase != "MiaoYuChat")
+ {
+ // 覆盖值
+ result
+ .FormatValue(query, w => w.CreationTime, (oldValue) => oldValue.ToString("yyyy-MM-dd"))
+ .FormatValue(query, w => w.LastModificationTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd"))
+ ;
+ }
// 设置列
//result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
//result.GetColumn(query, w => w.OperatorName!).SetColumn<@("SysUser")>(w => w.Name!);
diff --git a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientIndex.cshtml b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientIndex.cshtml
new file mode 100644
index 0000000..2eec82f
--- /dev/null
+++ b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientIndex.cshtml
@@ -0,0 +1,259 @@
+@model GenDbTableDto
+@{
+ var className = Model.EntityName;
+ var tableName = Model.TableName;
+ var ignores = new string[] {
+ "Id",
+ "CreationTime",
+ "CreatorUserId",
+ "LastModificationTime",
+ "LastModifierUserId" ,
+ "DeletionTime",
+ "DeleterUserId",
+ "IsDeleted"
+ };
+
+ var tableInfos = Model.TableInfos
+ .Where(w => !ignores.Contains(w.ColumnName))
+ .OrderBy(w => w.Position)
+ .ToList()
+ ;
+
+ var searchKeyWords = new[] { "Title", "Name", "Phone", "Address", "Email" };
+ var searchKeyWord = string.Empty;
+
+ foreach (var item in searchKeyWords)
+ {
+ if (tableInfos.Any(w => w.ColumnName == item))
+ {
+ searchKeyWord = item;
+ break;
+ }
+ }
+ if (string.IsNullOrWhiteSpace(searchKeyWord))
+ {
+ searchKeyWord = "请设置检索框";
+ }
+}
+
+
+
+
+
+
+ {
+ state.page = changeTable.pagination.current ?? 1;
+ state.size = changeTable.pagination.pageSize ?? state.size;
+ state.search.sort = changeTable.sorter instanceof Array ? [...changeTable.sorter] : [changeTable.sorter];
+ findList();
+ }
+ "
+ @@show-size-change="
+ ({ current, size }) => {
+ state.page = current == 0 ? 1 : current;
+ state.size = size;
+ findList();
+ }
+ "
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 重置
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+
+ refInfo?.open()" v-if="power.insert">
+
+
+
+ 新建
+
+
+
+
+
+
+ 批量删除
+
+
+
+
+
+
+
+
+ 导出 Excel
+
+
+ 更多
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ refInfo?.open(record.id)" v-if="power.update">编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientInfo.cshtml b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientInfo.cshtml
new file mode 100644
index 0000000..f85ad27
--- /dev/null
+++ b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientInfo.cshtml
@@ -0,0 +1,113 @@
+@model GenDbTableDto
+@{
+ var className = Model.EntityName;
+ var tableName = Model.TableName;
+ var ignores = new string[] {
+ "Id",
+ "CreationTime",
+ "CreatorUserId",
+ "LastModificationTime",
+ "LastModifierUserId" ,
+ "DeletionTime",
+ "DeleterUserId",
+ "IsDeleted"
+ };
+
+ var tableInfos = Model.TableInfos
+ .Where(w => !ignores.Contains(w.ColumnName))
+ .OrderBy(w => w.Position)
+ .ToList()
+ ;
+}
+
+
+
+
+
+
+
+ 提交
+ 关闭
+
+
+
+
+ @foreach (var item in tableInfos)
+ {
+ var name = item.ColumnName.ToFirstCharConvertLower();
+ var title = item.DisplayName ?? item.Describe;
+ title = string.IsNullOrWhiteSpace(title) ? "请设置列信息 " + item.ColumnName : title;
+
+
+ " + item.ColumnName)" name="@(name)" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
+
+
+
+ }
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientService.cshtml b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientService.cshtml
new file mode 100644
index 0000000..d062660
--- /dev/null
+++ b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempClientService.cshtml
@@ -0,0 +1,81 @@
+@model GenDbTableDto
+@{
+ var className = Model.EntityName;
+ var classNameRemark = Model.DisplayName;
+}
+
+import Http from "@@/core/utils/Http";
+
+/**
+ * @(className)服务
+ */
+export default class @(className)Service {
+
+ static urlPrefix = "/api/v1/admin/@className";
+
+ /**
+ * 获取数据列表
+ * @@param current
+ * @@param pageSize
+ * @@param search
+ * @@param searchSort
+ * @@returns
+ */
+ static findList(current: number, pageSize: number, search: any = {}, searchSort: any[] = []) {
+ return Http.post(`${this.urlPrefix}/findList`, {
+ page: current,
+ size: pageSize,
+ search,
+ searchSort
+ })
+ }
+
+ /**
+ * 删除集合数据
+ *
+ * @@param ids
+ * @@returns
+ */
+ static deleteList(ids: string[]) {
+ return Http.post(`${this.urlPrefix}/deleteList`, ids)
+ }
+
+ /**
+ * 查询表单
+ *
+ * @@param id
+ * @@returns
+ */
+ static findForm(id?: string | undefined) {
+ return Http.get(`${this.urlPrefix}/findForm${(id ? '/' + id : '')}`)
+ }
+
+ /**
+ * 保存表单数据
+ *
+ * @@param id
+ * @@param formData
+ * @@returns
+ */
+ static saveForm(id: string | undefined, formData: any) {
+ return Http.post(`${this.urlPrefix}/${id ? 'update' : 'create'}`, formData)
+ }
+
+ /**
+ * 导出 excel
+ *
+ * @@param search
+ * @@param searchSort
+ * @@returns
+ */
+ static exportExcel(search: any = {}, searchSort: any[] = []) {
+ return Http.download(`${this.urlPrefix}/exportExcel`, {
+ page: -1,
+ size: -1,
+ search,
+ searchSort
+ });
+ }
+
+}
+
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempController.cshtml b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempController.cshtml
new file mode 100644
index 0000000..c2f7eeb
--- /dev/null
+++ b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempController.cshtml
@@ -0,0 +1,109 @@
+@model GenDbTableDto
+@{
+ var className = Model.EntityName;
+ var classNameRemark = Model.DisplayName;
+}
+
+
+using @(Model.Namespace).Api.Admin.ApplicationServices.Apps;
+using @(Model.Namespace).Repository.ChatAI.Admin.Entities.Apps;
+namespace @(Model.Namespace).Api.Admin.Controllers.Apps;
+
+///
+/// @(classNameRemark) 控制器
+///
+[ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找,如果不设置不受权限保护!", DisplayName = "@(classNameRemark)")]
+public class @(className)Controller : AdminControllerBase<@($"{className}Service")>
+{
+ public @(className)Controller(@(className)Service defaultService)
+ : base(defaultService)
+ {
+
+ }
+
+ ///
+ /// 获取列表
+ ///
+ ///
+ ///
+ [ActionDescriptor(PermissionFunctionConsts.Function_Display, DisplayName = "查看数据")]
+ [HttpPost]
+ public Task<@("PagingView")> FindListAsync([FromBody] PagingSearchInput<@(className)> pagingSearchInput)
+ {
+ return this._defaultService.FindListAsync(pagingSearchInput);
+ }
+
+ ///
+ /// 根据id数组删除
+ ///
+ /// ids
+ ///
+ [ActionDescriptor(PermissionFunctionConsts.Function_Delete, DisplayName = "删除数据")]
+ [HttpPost]
+ public async Task<@("bool")> DeleteListAsync([FromBody] List<@("int")> ids)
+ {
+ await this._defaultService.DeleteListAsync(ids);
+ return true;
+ }
+
+ ///
+ /// 查询表单数据
+ ///
+ /// id
+ ///
+ [ActionDescriptor(DisplayName = "查看表单")]
+ [HttpGet("{id?}")]
+ public Task<@Html.Raw("Dictionary")> FindFormAsync([FromRoute] int id)
+ {
+ return this._defaultService.FindFormAsync(id);
+ }
+
+ ///
+ /// 添加
+ ///
+ ///
+ ///
+ [RequestLimitFilter(Duration = 1, LimitCount = 1)]
+ [ActionDescriptor(PermissionFunctionConsts.Function_Insert, DisplayName = "创建表单")]
+ [HttpPost]
+ [ApiCheckModel]
+ public Task CreateAsync([FromBody] @(className) form)
+ {
+ return this._defaultService.SaveFormAsync(form);
+ }
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ [RequestLimitFilter(Duration = 1, LimitCount = 1)]
+ [ActionDescriptor(PermissionFunctionConsts.Function_Update, DisplayName = "编辑表单")]
+ [HttpPost]
+ [ApiCheckModel]
+ public Task UpdateAsync([FromBody] @(className) form)
+ {
+ return this._defaultService.SaveFormAsync(form);
+ }
+
+ ///
+ /// 导出Excel
+ ///
+ ///
+ ///
+ [ActionDescriptor(PermissionFunctionConsts.Function_Export, DisplayName = "导出数据")]
+ [ApiResourceCacheFilter(10)]
+ [HttpPost]
+ public async Task ExportExcelAsync([FromBody] PagingSearchInput<@(className)> pagingSearchInput)
+ {
+ var data = await this._defaultService.ExportExcelAsync(pagingSearchInput);
+ var name = $"{PermissionUtil.GetControllerDisplayName(this.GetType())}列表数据 {DateTime.Now.ToString("yyyy-MM-dd")}.xls";
+ base.HttpContext.DownLoadFile(data, Tools.GetFileContentType[".xls"].ToStr(), name);
+ }
+
+
+
+
+}
+
+
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempModel.cshtml b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempModel.cshtml
new file mode 100644
index 0000000..78f4c0d
--- /dev/null
+++ b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempModel.cshtml
@@ -0,0 +1,116 @@
+@model GenDbTableDto
+@{
+ var className = Model.EntityName;
+ var classNameRemark = Model.DisplayName;
+
+ var ignores = new string[] {
+ "Id",
+ "CreationTime",
+ "CreatorUserId",
+ "LastModificationTime",
+ "LastModifierUserId" ,
+ "DeletionTime",
+ "DeleterUserId",
+ "IsDeleted",
+ "TenantId",
+ };
+
+ var tableInfos = Model.TableInfos
+ .Where(w => !ignores.Contains(w.ColumnName))
+ .OrderBy(w => w.Position)
+ .ToList()
+ ;
+}
+
+@functions
+{
+ //获取类型 根据 appTableInfo
+ string GetType(DbColumnInfo appTableInfo)
+ {
+ switch (appTableInfo.DbTypeText)
+ {
+ case "uniqueidentifier":
+ return appTableInfo.IsPrimary ? "Guid" : "Guid?";
+ case "bit":
+ case "int":
+ return appTableInfo.IsPrimary ? "int" : "int?";
+ case "datetime":
+ return appTableInfo.IsNullable ? "DateTime?" : "DateTime";
+ case "float":
+ case "money":
+ return appTableInfo.IsNullable ? "double?" : "double";
+ case "decimal":
+ return appTableInfo.IsNullable ? "decimal?" : "decimal";
+ default:
+ return appTableInfo.IsNullable ? appTableInfo.CsType.Name + "?" : appTableInfo.CsType.Name;
+ }
+ }
+
+ ///
+ /// 获取类型 根据 appTableInfo
+ ///
+ ///
+ ///
+ string GetTypeNew(LowCodeTableInfo appTableInfo)
+ {
+ if (appTableInfo.CsType.ToLower() == "string")
+ {
+ return "string?";
+ }
+
+ return appTableInfo.IsNullable ? $"{appTableInfo.CsType}?" : appTableInfo.CsType;
+ }
+
+ ///
+ /// 获取 id 组件所对应的类型
+ ///
+ ///
+ string GetIdType()
+ {
+ var lowCodeTableInfo = Model.TableInfos.Where(w => w.ColumnName == "Id")?.FirstOrDefault();
+
+ if (Model.DataBase == "MiaoYuChat")
+ {
+ return "DefaultEntityV4";
+ }
+ if (lowCodeTableInfo == null) return "DefaultEntity";
+
+ if (lowCodeTableInfo.CsType.ToLower().Contains("string"))
+ return "DefaultEntityStringKey";
+
+ if (lowCodeTableInfo.CsType.ToLower().Contains("int"))
+ return "DefaultEntityIdentityIntKey";
+
+ if (lowCodeTableInfo.CsType.ToLower().Contains("guid"))
+ return "DefaultEntity";
+
+ return "DefaultEntity<" + lowCodeTableInfo.CsType + ">";
+ }
+
+
+}
+
+
+
+namespace @(Model.Namespace).Repository.ChatAI.Admin.Entities.Apps;
+
+///
+/// @(string.IsNullOrWhiteSpace(classNameRemark) ? className : classNameRemark)
+///
+[EntityDescription(FieldIgnored = true)]
+public class @className : @(GetIdType())
+{
+
+ @foreach (var item in tableInfos)
+ {
+
+ ///
+ /// @(string.IsNullOrWhiteSpace(item.DisplayName) ? item.ColumnName : item.DisplayName) => 备注: @(string.IsNullOrWhiteSpace(item.Describe) ? item.ColumnName : item.Describe)
+ ///
+ public @(GetTypeNew(item)) @item.ColumnName { get; set; }
+
+ }
+
+}
+
+
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempService.cshtml b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempService.cshtml
new file mode 100644
index 0000000..c8beab9
--- /dev/null
+++ b/admin-server/MiaoYu.Api.Admin/wwwroot/code_generation/templatev4/tempService.cshtml
@@ -0,0 +1,142 @@
+@model GenDbTableDto
+@{
+ var className = Model.EntityName;
+ var classNameRemark = Model.DisplayName;
+
+ var ignores = new string[]
+ {
+ "Id",
+ "CreationTime",
+ "CreatorUserId",
+ "LastModificationTime",
+ "LastModifierUserId",
+ "DeletionTime",
+ "DeleterUserId",
+ "IsDeleted"
+ };
+
+ var tableInfos = Model.TableInfos
+ .Where(w => !ignores.Contains(w.ColumnName))
+ .OrderBy(w => w.Position)
+ .ToList()
+ ;
+ var searchKeyWords = new[] { "Title", "Name", "Phone", "Address", "Email" };
+ var searchKeyWord = string.Empty;
+ foreach (var item in searchKeyWords)
+ {
+ if (tableInfos.Any(w => w.ColumnName.Contains(item)))
+ {
+ searchKeyWord = item;
+ break;
+ }
+ }
+}
+
+using @(Model.Namespace).Repository.ChatAI.Admin.Entities.Apps;
+namespace @(Model.Namespace).Api.Admin.ApplicationServices.Apps;
+
+///
+/// @(classNameRemark) 服务 @(className)Service
+///
+public class @(className)Service : ApplicationService<@("IRepository")<@(className)>>
+{
+ public @(className)Service(IRepository<@(className)> defaultRepository)
+ : base(defaultRepository)
+ {
+
+ }
+
+ ///
+ /// 获取列表数据
+ ///
+ ///
+ ///
+ public async Task<@("PagingView")> FindListAsync(PagingSearchInput<@(className)> pagingSearchInput)
+ {
+ var query = this._defaultRepository.Select
+ @if (!string.IsNullOrWhiteSpace(searchKeyWord))
+ {
+ .WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.@(searchKeyWord)), w => w.@(searchKeyWord).Contains(pagingSearchInput.Search.@(searchKeyWord) ?? ""))
+ }
+ .OrderByDescending(w => w.Id)
+ .Select(w => new
+ {
+ w.Id,
+ @(string.Join(',', tableInfos.Select(w => "w." + w.ColumnName)))@(",")
+ // w.LastModificationTime,
+ // w.CreationTime
+ })
+ ;
+
+ var result = await _defaultRepository.AsPagingViewAsync(query, pagingSearchInput);
+ // result
+ // .FormatValue(query, w => w.CreationTime, (oldValue) => oldValue.ToString("yyyy-MM-dd"))
+ // .FormatValue(query, w => w.LastModificationTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd"))
+ // ;
+ // 设置列
+ //result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
+ //result.GetColumn(query, w => w.OperatorName!).SetColumn<@("SysUser")>(w => w.Name!);
+
+ return result;
+ }
+
+ ///
+ /// 根据id数组删除
+ ///
+ /// ids
+ ///
+ public async Task DeleteListAsync(List<@("int")> ids)
+ {
+ await this._defaultRepository.DeleteByIdsAsync(ids);
+ }
+
+ ///
+ /// 查询表单数据
+ ///
+ /// id
+ ///
+ public async Task<@("Dictionary")<@("string,object")>> FindFormAsync(int id)
+ {
+ var res = new Dictionary<@("string, object")>();
+ var form = await this._defaultRepository.FindByIdAsync(id);
+ form = form.NullSafe();
+ //if (form.CreateTime == null || form.CreateTime == DateTime.MinValue)
+ //{
+ // form.CreateTime = DateTime.Now;
+ //}
+ //if (form.UpdateTime == null || form.UpdateTime == DateTime.MinValue)
+ //{
+ // form.UpdateTime = DateTime.Now;
+ //}
+ res[nameof(id)] = id;
+ res[nameof(form)] = form;
+ return res;
+ }
+
+ ///
+ /// 保存数据
+ ///
+ /// form
+ ///
+ public Task SaveFormAsync(@className form)
+ {
+ return this._defaultRepository.InsertOrUpdateAsync(form);
+ }
+
+ ///
+ /// 导出Excel
+ ///
+ ///
+ ///
+ public async Task<@("byte[]")> ExportExcelAsync(PagingSearchInput<@(className)> pagingSearchInput)
+ {
+ pagingSearchInput.Page = -1;
+ var tableViewModel = await this.FindListAsync(pagingSearchInput);
+ return ExcelUtil.ExportExcelByPagingView(tableViewModel, null, "Id");
+ }
+
+
+
+}
+
+
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/TCharacterLabel.cs b/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/TCharacterLabel.cs
new file mode 100644
index 0000000..96e9cfa
--- /dev/null
+++ b/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/TCharacterLabel.cs
@@ -0,0 +1,29 @@
+namespace MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
+
+///
+/// 角色标签表
+///
+[EntityDescription(FieldIgnored = true)]
+public class T_Character_Label : DefaultEntityV4
+{
+
+
+ ///
+ /// 标签名称 => 备注: 标签名称
+ ///
+ public string? LabelName { get; set; }
+
+
+ ///
+ /// 创建时间 => 备注: 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+
+ ///
+ /// 更新时间 => 备注: 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+
+}
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/T_Character.cs b/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/T_Character.cs
new file mode 100644
index 0000000..202439d
--- /dev/null
+++ b/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/T_Character.cs
@@ -0,0 +1,77 @@
+namespace MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
+
+///
+/// 人物表
+///
+[EntityDescription(FieldIgnored = true)]
+public class T_Character : DefaultEntityV4
+{
+
+
+ ///
+ /// 人物名字 => 备注: 人物名字
+ ///
+ public string? Name { get; set; }
+
+
+ ///
+ /// 人物简介 => 备注: 人物简介
+ ///
+ public string? Biography { get; set; }
+
+
+ ///
+ /// 开场白 => 备注: 开场白
+ ///
+ public string? Prologue { get; set; }
+
+
+ ///
+ /// 模型Id => 备注: 模型Id
+ ///
+ public Int32 ModelConfigId { get; set; }
+
+
+ ///
+ /// 公开/私密 0公开 1私密 => 备注: 公开/私密 0公开 1私密
+ ///
+ public Boolean Visibility { get; set; }
+
+
+ ///
+ /// 创建时间 => 备注: 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+
+ ///
+ /// 更新时间 => 备注: 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+
+ ///
+ /// 性别0男1女2其他 => 备注: 性别0男1女2其他
+ ///
+ public Int32 Gender { get; set; }
+
+
+ ///
+ /// 人物初始设定 => 备注: 人物初始设定
+ ///
+ public string? System { get; set; }
+
+
+ ///
+ /// 背景图片 => 备注: 背景图片
+ ///
+ public Int32? BgImg { get; set; }
+
+
+ ///
+ /// 角色头像(是id) => 备注: 角色头像(是id)
+ ///
+ public Int32? IconImg { get; set; }
+
+
+}
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/T_Image_Config.cs b/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/T_Image_Config.cs
new file mode 100644
index 0000000..d84007e
--- /dev/null
+++ b/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/Apps/T_Image_Config.cs
@@ -0,0 +1,28 @@
+namespace MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
+
+///
+/// 图片表
+///
+public class T_Image_Config : DefaultEntityV4
+{
+
+
+ ///
+ /// 图片Id => 备注: 图片Id
+ ///
+ public Int32 ImageId { get; set; }
+
+
+ ///
+ /// 图片名称 => 备注: 图片名称
+ ///
+ public string? Name { get; set; }
+
+
+ ///
+ /// 图片地址 => 备注: 图片地址
+ ///
+ public string? Url { get; set; }
+
+
+}
\ No newline at end of file
diff --git a/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/T_Image_Config.cs b/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/T_Image_Config.cs
index bc9a83a..4baf464 100644
--- a/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/T_Image_Config.cs
+++ b/admin-server/MiaoYu.Repository.ChatAI.Admin/Entities/T_Image_Config.cs
@@ -35,6 +35,31 @@ namespace MiaoYu.Repository.ChatAI.Admin.Entities
public string Url { get; set; }
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateAt { get; set; }
+
+ ///
+ /// 修改时间
+ ///
+ public DateTime UpdateAt { get; set; }
+
+ ///
+ /// oss存放路径
+ ///
+ public string? OssPath { get; set; }
+
+ ///
+ /// 存储桶
+ ///
+ public string? Bucket { get; set; }
+
+ ///
+ /// 地域
+ ///
+ public string? Region { get; set; }
+
}
}
diff --git a/admin-server/MiaoYu.Repository.ChatAI.Admin/MiaoYu.Repository.ChatAI.Admin.csproj b/admin-server/MiaoYu.Repository.ChatAI.Admin/MiaoYu.Repository.ChatAI.Admin.csproj
index 6a424b5..b4dcbbe 100644
--- a/admin-server/MiaoYu.Repository.ChatAI.Admin/MiaoYu.Repository.ChatAI.Admin.csproj
+++ b/admin-server/MiaoYu.Repository.ChatAI.Admin/MiaoYu.Repository.ChatAI.Admin.csproj
@@ -8,6 +8,10 @@
$(MSBuildProjectName).xml
+
+
+
+
@@ -20,7 +24,7 @@
-
+
diff --git a/admin-server/MiaoYu.Repository.ChatAI.Admin/MiaoYu.Repository.ChatAI.Admin.xml b/admin-server/MiaoYu.Repository.ChatAI.Admin/MiaoYu.Repository.ChatAI.Admin.xml
index 6da15e1..833e66f 100644
--- a/admin-server/MiaoYu.Repository.ChatAI.Admin/MiaoYu.Repository.ChatAI.Admin.xml
+++ b/admin-server/MiaoYu.Repository.ChatAI.Admin/MiaoYu.Repository.ChatAI.Admin.xml
@@ -37,6 +37,86 @@