From 06d29c0172ed135a42dba1111db35b93a6ee5e0d Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Mon, 15 Apr 2024 11:16:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Api/Tiobon.Core.Model.xml | 10 ++++++ Tiobon.Core.Common/Tiobon.Core.Common.csproj | 4 +++ .../AttributeManager/EntityAttribute.cs | 32 +++++++++++++++++++ Tiobon.Core.Model/Models/Ghra/Ghra_Grade.cs | 2 +- 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 3432ff8a..9f7e8985 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -1794,6 +1794,16 @@ Ghra_Grade + + + 真实表名(数据库表名,若没有填写默认实体为表名) + + + + + 表中文名 + + 以下model 来自ids4项目,多库模式,为了调取ids4数据 diff --git a/Tiobon.Core.Common/Tiobon.Core.Common.csproj b/Tiobon.Core.Common/Tiobon.Core.Common.csproj index 2d619448..c5bbb911 100644 --- a/Tiobon.Core.Common/Tiobon.Core.Common.csproj +++ b/Tiobon.Core.Common/Tiobon.Core.Common.csproj @@ -9,6 +9,9 @@ + + + @@ -47,6 +50,7 @@ + diff --git a/Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs b/Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs new file mode 100644 index 00000000..068259c2 --- /dev/null +++ b/Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs @@ -0,0 +1,32 @@ +namespace Tiobon.Core.Model +{ + public class EntityAttribute : Attribute + { + /// + /// 真实表名(数据库表名,若没有填写默认实体为表名) + /// + public string TableName { get; set; } + /// + /// 表中文名 + /// + public string TableCnName { get; set; } + ///// + ///// 子表 + ///// + //public Type[] DetailTable { get; set; } + ///// + ///// 子表中文名 + ///// + //public string DetailTableCnName { get; set; } + ///// + ///// 数据库 + ///// + //public string DBServer { get; set; } + + ////是否开启用户数据权限,true=用户只能操作自己(及下级角色)创建的数据,如:查询、删除、修改等操作 + //public bool CurrentUserPermission { get; set; } + + //public Type ApiInput { get; set; } + //public Type ApiOutput { get; set; } + } +} diff --git a/Tiobon.Core.Model/Models/Ghra/Ghra_Grade.cs b/Tiobon.Core.Model/Models/Ghra/Ghra_Grade.cs index 78096628..45feea52 100644 --- a/Tiobon.Core.Model/Models/Ghra/Ghra_Grade.cs +++ b/Tiobon.Core.Model/Models/Ghra/Ghra_Grade.cs @@ -24,7 +24,7 @@ namespace Tiobon.Core.Model.Models /// /// Ghra_Grade /// - [SugarTable("Ghra_Grade", "Ghra_Grade")] + [SugarTable("Ghra_Grade", "Ghra_Grade"), Entity(TableCnName = "BOM", TableName = "PsBOM")] public class Ghra_Grade : BasePoco {