feat: initialize Evergreen Health backend
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
+177
@@ -0,0 +1,177 @@
|
|||||||
|
[*.cs]
|
||||||
|
#### 命名样式 ####
|
||||||
|
|
||||||
|
# 命名规则
|
||||||
|
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||||
|
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
# 符号规范
|
||||||
|
|
||||||
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.interface.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.types.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||||
|
|
||||||
|
# 命名样式
|
||||||
|
|
||||||
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||||
|
dotnet_naming_style.begins_with_i.required_suffix =
|
||||||
|
dotnet_naming_style.begins_with_i.word_separator =
|
||||||
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.pascal_case.required_prefix =
|
||||||
|
dotnet_naming_style.pascal_case.required_suffix =
|
||||||
|
dotnet_naming_style.pascal_case.word_separator =
|
||||||
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.pascal_case.required_prefix =
|
||||||
|
dotnet_naming_style.pascal_case.required_suffix =
|
||||||
|
dotnet_naming_style.pascal_case.word_separator =
|
||||||
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||||
|
csharp_using_directive_placement = outside_namespace:silent
|
||||||
|
csharp_style_expression_bodied_methods = false:silent
|
||||||
|
csharp_style_expression_bodied_constructors = false:silent
|
||||||
|
csharp_style_expression_bodied_operators = false:silent
|
||||||
|
csharp_style_expression_bodied_properties = true:silent
|
||||||
|
csharp_style_expression_bodied_indexers = true:silent
|
||||||
|
csharp_style_expression_bodied_accessors = true:silent
|
||||||
|
csharp_style_expression_bodied_lambdas = true:silent
|
||||||
|
csharp_style_expression_bodied_local_functions = false:silent
|
||||||
|
csharp_style_conditional_delegate_call = true:suggestion
|
||||||
|
csharp_style_var_for_built_in_types = false:silent
|
||||||
|
csharp_style_var_when_type_is_apparent = false:silent
|
||||||
|
csharp_style_var_elsewhere = false:silent
|
||||||
|
csharp_prefer_simple_using_statement = true:suggestion
|
||||||
|
csharp_prefer_braces = true:silent
|
||||||
|
csharp_style_namespace_declarations = file_scoped:silent
|
||||||
|
csharp_style_prefer_top_level_statements = true:silent
|
||||||
|
csharp_style_prefer_method_group_conversion = true:silent
|
||||||
|
csharp_prefer_static_local_function = true:suggestion
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
|
||||||
|
csharp_style_prefer_switch_expression = true:suggestion
|
||||||
|
csharp_style_prefer_pattern_matching = true:silent
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||||
|
csharp_style_prefer_not_pattern = true:suggestion
|
||||||
|
csharp_style_prefer_extended_property_pattern = true:suggestion
|
||||||
|
csharp_style_throw_expression = true:suggestion
|
||||||
|
csharp_style_prefer_null_check_over_type_check = true:suggestion
|
||||||
|
csharp_prefer_simple_default_expression = true:suggestion
|
||||||
|
csharp_style_prefer_local_over_anonymous_function = true:suggestion
|
||||||
|
csharp_style_prefer_index_operator = true:suggestion
|
||||||
|
csharp_style_prefer_range_operator = true:suggestion
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
|
||||||
|
csharp_style_prefer_tuple_swap = true:suggestion
|
||||||
|
csharp_style_prefer_utf8_string_literals = true:suggestion
|
||||||
|
csharp_style_inlined_variable_declaration = true:suggestion
|
||||||
|
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||||
|
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
|
||||||
|
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
|
||||||
|
csharp_space_around_binary_operators = before_and_after
|
||||||
|
csharp_indent_labels = one_less_than_current
|
||||||
|
|
||||||
|
[*.vb]
|
||||||
|
#### 命名样式 ####
|
||||||
|
|
||||||
|
# 命名规则
|
||||||
|
|
||||||
|
dotnet_naming_rule.interface_should_be_以_i_开始.severity = suggestion
|
||||||
|
dotnet_naming_rule.interface_should_be_以_i_开始.symbols = interface
|
||||||
|
dotnet_naming_rule.interface_should_be_以_i_开始.style = 以_i_开始
|
||||||
|
|
||||||
|
dotnet_naming_rule.类型_should_be_帕斯卡拼写法.severity = suggestion
|
||||||
|
dotnet_naming_rule.类型_should_be_帕斯卡拼写法.symbols = 类型
|
||||||
|
dotnet_naming_rule.类型_should_be_帕斯卡拼写法.style = 帕斯卡拼写法
|
||||||
|
|
||||||
|
dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.severity = suggestion
|
||||||
|
dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.symbols = 非字段成员
|
||||||
|
dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.style = 帕斯卡拼写法
|
||||||
|
|
||||||
|
# 符号规范
|
||||||
|
|
||||||
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
|
||||||
|
dotnet_naming_symbols.interface.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.类型.applicable_kinds = class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.类型.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
|
||||||
|
dotnet_naming_symbols.类型.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.非字段成员.applicable_kinds = property, event, method
|
||||||
|
dotnet_naming_symbols.非字段成员.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
|
||||||
|
dotnet_naming_symbols.非字段成员.required_modifiers =
|
||||||
|
|
||||||
|
# 命名样式
|
||||||
|
|
||||||
|
dotnet_naming_style.以_i_开始.required_prefix = I
|
||||||
|
dotnet_naming_style.以_i_开始.required_suffix =
|
||||||
|
dotnet_naming_style.以_i_开始.word_separator =
|
||||||
|
dotnet_naming_style.以_i_开始.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.帕斯卡拼写法.required_prefix =
|
||||||
|
dotnet_naming_style.帕斯卡拼写法.required_suffix =
|
||||||
|
dotnet_naming_style.帕斯卡拼写法.word_separator =
|
||||||
|
dotnet_naming_style.帕斯卡拼写法.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.帕斯卡拼写法.required_prefix =
|
||||||
|
dotnet_naming_style.帕斯卡拼写法.required_suffix =
|
||||||
|
dotnet_naming_style.帕斯卡拼写法.word_separator =
|
||||||
|
dotnet_naming_style.帕斯卡拼写法.capitalization = pascal_case
|
||||||
|
|
||||||
|
[*.{cs,vb}]
|
||||||
|
end_of_line = crlf
|
||||||
|
dotnet_style_qualification_for_field = false:silent
|
||||||
|
dotnet_style_qualification_for_property = false:silent
|
||||||
|
dotnet_style_qualification_for_method = false:silent
|
||||||
|
dotnet_style_qualification_for_event = false:silent
|
||||||
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||||
|
dotnet_code_quality_unused_parameters = all:suggestion
|
||||||
|
dotnet_style_readonly_field = true:suggestion
|
||||||
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||||
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||||
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||||
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||||
|
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
|
||||||
|
dotnet_style_coalesce_expression = true:suggestion
|
||||||
|
dotnet_style_null_propagation = true:suggestion
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
|
||||||
|
dotnet_style_prefer_auto_properties = true:silent
|
||||||
|
dotnet_style_object_initializer = true:suggestion
|
||||||
|
dotnet_style_collection_initializer = true:suggestion
|
||||||
|
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
||||||
|
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||||
|
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||||
|
dotnet_style_explicit_tuple_names = true:suggestion
|
||||||
|
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||||
|
dotnet_style_prefer_compound_assignment = true:suggestion
|
||||||
|
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
||||||
|
dotnet_style_namespace_match_folder = true:suggestion
|
||||||
|
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||||
|
dotnet_style_predefined_type_for_member_access = true:silent
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
||||||
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||||
|
|
||||||
|
# Add copyright file header
|
||||||
|
file_header_template = Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\n\n本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\n\n不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
# Build output
|
||||||
|
**/bin/
|
||||||
|
**/obj/
|
||||||
|
publish/
|
||||||
|
logs/
|
||||||
|
|
||||||
|
# IDE and user settings
|
||||||
|
.vs/
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.user
|
||||||
|
*.suo
|
||||||
|
|
||||||
|
# Local secrets and runtime files
|
||||||
|
**/Configuration/Database.local.json
|
||||||
|
**/wwwroot/upload/
|
||||||
|
*.db
|
||||||
|
*.db-shm
|
||||||
|
*.db-wal
|
||||||
|
|
||||||
|
# OS files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<NoWarn>1701;1702;1591;8632</NoWarn>
|
||||||
|
<DocumentationFile></DocumentationFile>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
|
<Nullable>disable</Nullable>
|
||||||
|
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||||
|
<Copyright>Admin.NET</Copyright>
|
||||||
|
<Description>Admin.NET 通用权限开发平台</Description>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="4.2.0" />
|
||||||
|
<PackageReference Include="AlipaySDKNet.Standard" Version="4.9.971" />
|
||||||
|
<PackageReference Include="AngleSharp" Version="1.4.0" />
|
||||||
|
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
|
||||||
|
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
||||||
|
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.2.3" />
|
||||||
|
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.8.10" />
|
||||||
|
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.8.10" />
|
||||||
|
<PackageReference Include="Furion.Pure" Version="4.9.8.10" />
|
||||||
|
<PackageReference Include="Hardware.Info" Version="101.1.1.1" />
|
||||||
|
<PackageReference Include="Hashids.net" Version="1.7.0" />
|
||||||
|
<PackageReference Include="IPTools.China" Version="1.6.0" />
|
||||||
|
<PackageReference Include="IPTools.International" Version="1.6.0" />
|
||||||
|
<PackageReference Include="log4net" Version="3.2.0" />
|
||||||
|
<PackageReference Include="Lazy.Captcha.Core" Version="2.2.2" />
|
||||||
|
<PackageReference Include="Magicodes.IE.Excel" Version="2.8.0" />
|
||||||
|
<PackageReference Include="Magicodes.IE.Pdf" Version="2.8.0" />
|
||||||
|
<PackageReference Include="Magicodes.IE.Word" Version="2.8.0" />
|
||||||
|
<PackageReference Include="MailKit" Version="4.14.1" />
|
||||||
|
<PackageReference Include="MiniExcel" Version="1.42.0" />
|
||||||
|
<PackageReference Include="MiniWord" Version="0.9.2" />
|
||||||
|
<PackageReference Include="NewLife.Redis" Version="6.4.2026.104" />
|
||||||
|
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="4.0.0" />
|
||||||
|
<PackageReference Include="OnceMi.AspNetCore.OSS" Version="1.2.0" />
|
||||||
|
<PackageReference Include="QRCoder" Version="1.7.0" />
|
||||||
|
<PackageReference Include="RabbitMQ.Client" Version="7.2.0" />
|
||||||
|
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.2.0" />
|
||||||
|
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.13.0" />
|
||||||
|
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.16.0" />
|
||||||
|
<PackageReference Include="SqlSugar.MongoDbCore" Version="5.1.4.277" />
|
||||||
|
<PackageReference Include="SqlSugarCore" Version="5.1.4.211" />
|
||||||
|
<PackageReference Include="SSH.NET" Version="2025.1.0" />
|
||||||
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.7.1" />
|
||||||
|
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1363" />
|
||||||
|
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||||
|
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||||
|
<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.2" Aliases="BouncyCastleV2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
|
||||||
|
<PackageReference Include="AspNet.Security.OAuth.Gitee" Version="8.3.0" />
|
||||||
|
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="8.3.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.22" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.22" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="8.0.22" />
|
||||||
|
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.13" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
|
||||||
|
<PackageReference Include="AspNet.Security.OAuth.Gitee" Version="10.0.0" />
|
||||||
|
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="10.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="10.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="10.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="10.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.4" />
|
||||||
|
<PackageReference Include="XiHan.Framework.Utils" Version="2.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 通用接口参数验证特性类
|
||||||
|
/// </summary>
|
||||||
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
|
public class CommonValidationAttribute : ValidationAttribute
|
||||||
|
{
|
||||||
|
private readonly Dictionary<string, string> _conditions;
|
||||||
|
private static readonly Dictionary<string, Delegate> CompiledConditions = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="conditionPairs">条件对参数,长度必须为偶数<br/>
|
||||||
|
/// 奇数字符串参数:动态条件<br/>
|
||||||
|
/// 偶数字符串参数:提示消息
|
||||||
|
/// </param>
|
||||||
|
/// <example>
|
||||||
|
/// <code lang="C">
|
||||||
|
/// public class ModelInput {
|
||||||
|
///
|
||||||
|
///
|
||||||
|
/// public string A { get; set; }
|
||||||
|
///
|
||||||
|
///
|
||||||
|
/// [CommonValidation(
|
||||||
|
/// "A == 1 <value>&&</value> B == null", "当 A == 1时,B不能为空",
|
||||||
|
/// "C == 2 <value>&&</value> B == null", "当 C == 2时,B不能为空"
|
||||||
|
/// )]
|
||||||
|
/// public string B { get; set; }
|
||||||
|
/// }
|
||||||
|
/// </code>
|
||||||
|
/// </example>
|
||||||
|
public CommonValidationAttribute(params string[] conditionPairs)
|
||||||
|
{
|
||||||
|
if (conditionPairs.Length % 2 != 0) throw new ArgumentException("条件对必须以偶数个字符串的形式提供。");
|
||||||
|
|
||||||
|
var conditions = new Dictionary<string, string>();
|
||||||
|
for (int i = 0; i < conditionPairs.Length; i += 2)
|
||||||
|
conditions.Add(conditionPairs[i], conditionPairs[i + 1]);
|
||||||
|
|
||||||
|
_conditions = conditions;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
foreach (var (expr, errorMessage) in _conditions)
|
||||||
|
{
|
||||||
|
var conditionKey = $"{validationContext.ObjectType.FullName}.{expr}";
|
||||||
|
if (!CompiledConditions.TryGetValue(conditionKey, out var condition))
|
||||||
|
{
|
||||||
|
condition = CreateCondition(validationContext.ObjectType, expr);
|
||||||
|
CompiledConditions[conditionKey] = condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((bool)condition.DynamicInvoke(validationContext.ObjectInstance)!)
|
||||||
|
{
|
||||||
|
return new ValidationResult(errorMessage ?? $"[{validationContext.MemberName}]校验失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ValidationResult.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Delegate CreateCondition(Type modelType, string expression)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 创建参数表达式
|
||||||
|
var parameter = Expression.Parameter(typeof(object), "x");
|
||||||
|
|
||||||
|
// 构建 Lambda 表达式
|
||||||
|
var lambda = DynamicExpressionParser.ParseLambda(new[] { Expression.Parameter(modelType, "x") }, typeof(bool), expression);
|
||||||
|
|
||||||
|
// 创建新的 Lambda 表达式,接受 object 参数并调用编译后的表达式
|
||||||
|
var invokeExpression = Expression.Invoke(lambda, Expression.Convert(parameter, modelType));
|
||||||
|
var finalLambda = Expression.Lambda<Func<object, bool>>(invokeExpression, parameter);
|
||||||
|
|
||||||
|
return finalLambda.Compile();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new ArgumentException($"无法解析表达式 '{expression}': {ex.Message}", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 常量特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class ConstAttribute : Attribute
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public ConstAttribute(string name)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义Json转换字段名
|
||||||
|
/// </summary>
|
||||||
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
|
public class CustomJsonPropertyAttribute : Attribute
|
||||||
|
{
|
||||||
|
public string Name { get; }
|
||||||
|
|
||||||
|
public CustomJsonPropertyAttribute(string name)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义规范化结果特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class CustomUnifyResultAttribute : Attribute
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public CustomUnifyResultAttribute(string name)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据脱敏特性(支持自定义脱敏位置和脱敏字符)
|
||||||
|
/// </summary>
|
||||||
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
|
public class DataMaskAttribute : Attribute
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 脱敏起始位置(从0开始)
|
||||||
|
/// </summary>
|
||||||
|
private int StartIndex { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 脱敏长度
|
||||||
|
/// </summary>
|
||||||
|
private int Length { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 脱敏字符(默认*)
|
||||||
|
/// </summary>
|
||||||
|
private char MaskChar { get; set; } = '*';
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否保留原始长度(默认true)
|
||||||
|
/// </summary>
|
||||||
|
private bool KeepLength { get; set; } = true;
|
||||||
|
|
||||||
|
public DataMaskAttribute(int startIndex, int length)
|
||||||
|
{
|
||||||
|
if (startIndex < 0) throw new ArgumentOutOfRangeException(nameof(startIndex));
|
||||||
|
if (length <= 0) throw new ArgumentOutOfRangeException(nameof(length));
|
||||||
|
|
||||||
|
StartIndex = startIndex;
|
||||||
|
Length = length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 执行脱敏处理
|
||||||
|
/// </summary>
|
||||||
|
public string Mask(string input)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(input) || input.Length <= StartIndex)
|
||||||
|
return input;
|
||||||
|
|
||||||
|
var maskedLength = Math.Min(Length, input.Length - StartIndex);
|
||||||
|
var maskStr = new string(MaskChar, KeepLength ? maskedLength : Math.Min(4, maskedLength));
|
||||||
|
|
||||||
|
return input.Substring(0, StartIndex) + maskStr +
|
||||||
|
(StartIndex + maskedLength < input.Length ?
|
||||||
|
input.Substring(StartIndex + maskedLength) : "");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典值合规性校验特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class DictAttribute : ValidationAttribute, ITransient
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 字典编码
|
||||||
|
/// </summary>
|
||||||
|
public string DictTypeCode { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否允许空字符串
|
||||||
|
/// </summary>
|
||||||
|
public bool AllowEmptyStrings { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 允许空值,有值才验证,默认 false
|
||||||
|
/// </summary>
|
||||||
|
public bool AllowNullValue { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典值合规性校验特性
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dictTypeCode"></param>
|
||||||
|
/// <param name="errorMessage"></param>
|
||||||
|
public DictAttribute(string dictTypeCode = "", string errorMessage = "字典值不合法!")
|
||||||
|
{
|
||||||
|
DictTypeCode = dictTypeCode;
|
||||||
|
ErrorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典值合规性校验
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <param name="validationContext"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
protected override ValidationResult IsValid(object? value, ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
// 判断是否允许空值
|
||||||
|
if (AllowNullValue && value == null) return ValidationResult.Success;
|
||||||
|
|
||||||
|
// 获取属性的类型
|
||||||
|
var property = validationContext.ObjectType.GetProperty(validationContext.MemberName!);
|
||||||
|
if (property == null) return new ValidationResult($"未知属性: {validationContext.MemberName}");
|
||||||
|
|
||||||
|
string importHeaderName = GetImporterHeaderName(property, validationContext.MemberName);
|
||||||
|
|
||||||
|
var propertyType = Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType;
|
||||||
|
|
||||||
|
// 先尝试从 ValidationContext 的依赖注入容器中拿服务,拿不到或类型不匹配时,再从全局的 App 容器中获取
|
||||||
|
if (validationContext.GetService(typeof(SysDictDataService)) is not SysDictDataService sysDictDataService)
|
||||||
|
sysDictDataService = App.GetRequiredService<SysDictDataService>();
|
||||||
|
|
||||||
|
// 获取字典值列表
|
||||||
|
var dictDataList = sysDictDataService.GetDataList(DictTypeCode).GetAwaiter().GetResult();
|
||||||
|
|
||||||
|
// 使用 HashSet 来提高查找效率
|
||||||
|
var dictHash = new HashSet<string>(dictDataList.Select(u => u.Value));
|
||||||
|
|
||||||
|
// 判断是否为集合类型
|
||||||
|
if (propertyType.IsGenericType && propertyType.GetGenericTypeDefinition() == typeof(List<>))
|
||||||
|
{
|
||||||
|
// 如果是空集合并且允许空值,则直接返回成功
|
||||||
|
if (value == null && AllowNullValue) return ValidationResult.Success;
|
||||||
|
|
||||||
|
// 处理集合为空的情况
|
||||||
|
var collection = value as IEnumerable;
|
||||||
|
if (collection == null) return ValidationResult.Success;
|
||||||
|
|
||||||
|
// 获取集合的元素类型
|
||||||
|
var elementType = propertyType.GetGenericArguments()[0];
|
||||||
|
var underlyingElementType = Nullable.GetUnderlyingType(elementType) ?? elementType;
|
||||||
|
|
||||||
|
// 如果元素类型是枚举,则逐个验证
|
||||||
|
if (underlyingElementType.IsEnum)
|
||||||
|
{
|
||||||
|
foreach (var item in collection)
|
||||||
|
{
|
||||||
|
if (item == null && AllowNullValue) continue;
|
||||||
|
|
||||||
|
if (!Enum.IsDefined(underlyingElementType, item!))
|
||||||
|
return new ValidationResult($"提示:{ErrorMessage}|枚举值【{item}】不是有效的【{underlyingElementType.Name}】枚举类型值!", [importHeaderName]);
|
||||||
|
}
|
||||||
|
return ValidationResult.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in collection)
|
||||||
|
{
|
||||||
|
if (item == null && AllowNullValue) continue;
|
||||||
|
|
||||||
|
var itemString = item?.ToString();
|
||||||
|
if (!dictHash.Contains(itemString))
|
||||||
|
return new ValidationResult($"提示:{ErrorMessage}|字典【{DictTypeCode}】不包含【{itemString}】!", [importHeaderName]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ValidationResult.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
var valueAsString = value?.ToString();
|
||||||
|
|
||||||
|
// 是否忽略空字符串
|
||||||
|
if (AllowEmptyStrings && string.IsNullOrEmpty(valueAsString)) return ValidationResult.Success;
|
||||||
|
|
||||||
|
// 枚举类型验证
|
||||||
|
if (propertyType.IsEnum)
|
||||||
|
{
|
||||||
|
if (!Enum.IsDefined(propertyType, value!)) return new ValidationResult($"提示:{ErrorMessage}|枚举值【{value}】不是有效的【{propertyType.Name}】枚举类型值!", [importHeaderName]);
|
||||||
|
return ValidationResult.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dictHash.Contains(valueAsString))
|
||||||
|
return new ValidationResult($"提示:{ErrorMessage}|字典【{DictTypeCode}】不包含【{valueAsString}】!", [importHeaderName]);
|
||||||
|
|
||||||
|
return ValidationResult.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取本字段上 [ImporterHeader(Name = "xxx")] 里的Name,如果没有则使用defaultName.
|
||||||
|
/// 用于在从excel导入数据时,能让调用者知道是哪个字段验证失败,而不是抛异常
|
||||||
|
/// </summary>
|
||||||
|
private static string GetImporterHeaderName(PropertyInfo property, string defaultName)
|
||||||
|
{
|
||||||
|
var importerHeader = property.GetCustomAttribute<ImporterHeaderAttribute>();
|
||||||
|
string importerHeaderName = importerHeader?.Name ?? defaultName;
|
||||||
|
return importerHeaderName;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 枚举值合规性校验特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Enum | AttributeTargets.Field, AllowMultiple = true)]
|
||||||
|
public class EnumAttribute : ValidationAttribute, ITransient
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 枚举值合规性校验特性
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="errorMessage"></param>
|
||||||
|
public EnumAttribute(string errorMessage = "枚举值不合法!")
|
||||||
|
{
|
||||||
|
ErrorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 枚举值合规性校验
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <param name="validationContext"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
// 获取属性的类型
|
||||||
|
var property = validationContext.ObjectType.GetProperty(validationContext.MemberName);
|
||||||
|
if (property == null)
|
||||||
|
return new ValidationResult($"未知属性: {validationContext.MemberName}");
|
||||||
|
|
||||||
|
var propertyType = Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType;
|
||||||
|
|
||||||
|
// 检查属性类型是否为枚举或可空枚举类型
|
||||||
|
if (!propertyType.IsEnum)
|
||||||
|
return new ValidationResult($"属性类型'{validationContext.MemberName}'不是有效的枚举类型!");
|
||||||
|
|
||||||
|
// 检查枚举值是否有效
|
||||||
|
if (value == null && Nullable.GetUnderlyingType(property.PropertyType) == null)
|
||||||
|
return new ValidationResult($"提示:{ErrorMessage}|枚举值不能为 null!");
|
||||||
|
|
||||||
|
if (value != null && !Enum.IsDefined(propertyType, value))
|
||||||
|
return new ValidationResult($"提示:{ErrorMessage}|枚举值【{value}】不是有效的【{propertyType.Name}】枚举类型值!");
|
||||||
|
|
||||||
|
return ValidationResult.Success;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.Security.Claims;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 防止重复请求过滤器特性(此特性使用了分布式锁,需确保系统支持分布式锁)
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class IdempotentAttribute : Attribute, IAsyncActionFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 请求间隔时间/秒
|
||||||
|
/// </summary>
|
||||||
|
public int IntervalTime { get; set; } = 5;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 错误提示内容
|
||||||
|
/// </summary>
|
||||||
|
public string Message { get; set; } = "你操作频率过快,请稍后重试!";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 缓存前缀: Key+请求路由+用户Id+请求参数
|
||||||
|
/// </summary>
|
||||||
|
public string CacheKey { get; set; } = CacheConst.KeyIdempotent;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否直接抛出异常:Ture是,False返回上次请求结果
|
||||||
|
/// </summary>
|
||||||
|
public bool ThrowBah { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 锁前缀
|
||||||
|
/// </summary>
|
||||||
|
public string LockPrefix { get; set; } = "lock_";
|
||||||
|
|
||||||
|
public IdempotentAttribute()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
|
||||||
|
{
|
||||||
|
var httpContext = context.HttpContext;
|
||||||
|
var path = httpContext.Request.Path.Value.ToString();
|
||||||
|
var userId = httpContext.User?.FindFirstValue(ClaimConst.UserId);
|
||||||
|
var cacheExpireTime = TimeSpan.FromSeconds(IntervalTime);
|
||||||
|
|
||||||
|
var parameters = JsonConvert.SerializeObject(context.ActionArguments, Formatting.None, new JsonSerializerSettings
|
||||||
|
{
|
||||||
|
NullValueHandling = NullValueHandling.Include,
|
||||||
|
DefaultValueHandling = DefaultValueHandling.Include
|
||||||
|
});
|
||||||
|
|
||||||
|
var cacheKey = CacheKey + MD5Encryption.Encrypt($"{path}{userId}{parameters}");
|
||||||
|
var sysCacheService = httpContext.RequestServices.GetService<SysCacheService>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 分布式锁
|
||||||
|
using var distributedLock = sysCacheService.BeginCacheLock($"{LockPrefix}{cacheKey}") ?? throw Oops.Oh(Message);
|
||||||
|
|
||||||
|
var cacheValue = sysCacheService.Get<ResponseData>(cacheKey);
|
||||||
|
if (cacheValue != null)
|
||||||
|
{
|
||||||
|
if (ThrowBah) throw Oops.Oh(Message);
|
||||||
|
context.Result = new ObjectResult(cacheValue.Value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var resultContext = await next();
|
||||||
|
// 缓存请求结果,null值不缓存
|
||||||
|
if (resultContext.Result is ObjectResult { Value: { } } objectResult)
|
||||||
|
{
|
||||||
|
var typeName = objectResult.Value.GetType().Name;
|
||||||
|
var responseData = new ResponseData
|
||||||
|
{
|
||||||
|
Type = typeName,
|
||||||
|
Value = objectResult.Value
|
||||||
|
};
|
||||||
|
sysCacheService.Set(cacheKey, responseData, cacheExpireTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw Oops.Oh($"{Message}-{ex}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求结果数据
|
||||||
|
/// </summary>
|
||||||
|
private class ResponseData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 结果类型
|
||||||
|
/// </summary>
|
||||||
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求结果
|
||||||
|
/// </summary>
|
||||||
|
public dynamic Value { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 忽略枚举类型转字典特性(标记在枚举类型)
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Enum, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class IgnoreEnumToDictAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 忽略表结构初始化特性(标记在实体)
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class IgnoreTableAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 忽略更新种子特性(标记在种子类)
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class IgnoreUpdateSeedAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 忽略更新种子列特性(标记在实体属性)
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class IgnoreUpdateSeedColumnAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 属性字典配置
|
||||||
|
/// </summary>
|
||||||
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
|
public class ImportDictAttribute : Attribute
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 字典Code
|
||||||
|
/// </summary>
|
||||||
|
public string TypeCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 目标对象名称
|
||||||
|
/// </summary>
|
||||||
|
public string TargetPropName { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 增量种子特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class IncreSeedAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 增量表特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class IncreTableAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志表特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class LogTableAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字符串掩码
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class MaskNewtonsoftJsonConverter : JsonConverter<string>
|
||||||
|
{
|
||||||
|
public override string ReadJson(JsonReader reader, Type objectType, string existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
return reader.Value.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(JsonWriter writer, string value, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
writer.WriteValue(value?.ToString().Mask());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 身份证掩码
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class MaskIdCardNewtonsoftJsonConverter : JsonConverter<string>
|
||||||
|
{
|
||||||
|
public override string ReadJson(JsonReader reader, Type objectType, string existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
return reader.Value.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(JsonWriter writer, string value, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
writer.WriteValue(value?.ToString().MaskIdCard());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮箱掩码
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class MaskEmailNewtonsoftJsonConverter : JsonConverter<string>
|
||||||
|
{
|
||||||
|
public override string ReadJson(JsonReader reader, Type objectType, string existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
return reader.Value.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(JsonWriter writer, string value, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
writer.WriteValue(value?.ToString().MaskEmail());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字符串掩码
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class MaskSystemTextJsonConverter : JsonConverter<string>
|
||||||
|
{
|
||||||
|
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
return reader.GetString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
writer.WriteStringValue(value?.ToString().Mask());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 身份证掩码
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class MaskIdCardSystemTextJsonConverter : JsonConverter<string>
|
||||||
|
{
|
||||||
|
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
return reader.GetString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
writer.WriteStringValue(value?.ToString().MaskIdCard());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮箱掩码
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class MaskEmailSystemTextJsonConverter : JsonConverter<string>
|
||||||
|
{
|
||||||
|
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
return reader.GetString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
writer.WriteStringValue(value?.ToString().MaskEmail());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大值校验
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class MaxValueAttribute : ValidationAttribute
|
||||||
|
{
|
||||||
|
private double MaxValue { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
public MaxValueAttribute(double value) => this.MaxValue = value;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大值校验
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override bool IsValid(object value)
|
||||||
|
{
|
||||||
|
return value == null || Convert.ToDouble(value) <= this.MaxValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 错误信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override string FormatErrorMessage(string name) => base.FormatErrorMessage(name);
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最小值校验
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class MinValueAttribute : ValidationAttribute
|
||||||
|
{
|
||||||
|
private double MinValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最小值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
public MinValueAttribute(double value) => this.MinValue = value;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最小值校验
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override bool IsValid(object value)
|
||||||
|
{
|
||||||
|
return value == null || Convert.ToDouble(value) > this.MinValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 错误信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override string FormatErrorMessage(string name) => base.FormatErrorMessage(name);
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 校验集合不能为空
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class NotEmptyAttribute : ValidationAttribute
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 校验集合不能为空
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override bool IsValid(object value) => (value as IEnumerable)?.GetEnumerator().MoveNext() ?? false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 错误信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override string FormatErrorMessage(string name) => base.FormatErrorMessage(name);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属机构数据权限
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class OwnerOrgAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属用户数据权限
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class OwnerUserAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 种子数据特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class SeedDataAttribute : Attribute
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 排序(越大越后执行)
|
||||||
|
/// </summary>
|
||||||
|
public int Order { get; set; } = 0;
|
||||||
|
|
||||||
|
public SeedDataAttribute(int orderNo)
|
||||||
|
{
|
||||||
|
Order = orderNo;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统表特性
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||||
|
public class SysTableAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 枚举拓展主题样式
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[AttributeUsage(AttributeTargets.Enum | AttributeTargets.Field)]
|
||||||
|
public class ThemeAttribute : Attribute
|
||||||
|
{
|
||||||
|
public string Theme { get; private set; }
|
||||||
|
|
||||||
|
public ThemeAttribute(string theme)
|
||||||
|
{
|
||||||
|
this.Theme = theme;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
|
using NewLife.Caching.Services;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
public static class CacheSetup
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 缓存注册(新生命Redis组件)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="services"></param>
|
||||||
|
public static void AddCache(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
var cacheOptions = App.GetConfig<CacheOptions>("Cache", true);
|
||||||
|
if (cacheOptions.CacheType == CacheTypeEnum.Redis.ToString())
|
||||||
|
{
|
||||||
|
var redis = new FullRedis(new RedisOptions
|
||||||
|
{
|
||||||
|
Configuration = cacheOptions.Redis.Configuration,
|
||||||
|
Prefix = cacheOptions.Redis.Prefix
|
||||||
|
})
|
||||||
|
{
|
||||||
|
// 自动检测集群节点
|
||||||
|
AutoDetect = App.GetConfig<bool>("Cache:Redis:AutoDetect", true)
|
||||||
|
};
|
||||||
|
// 最大消息大小
|
||||||
|
if (cacheOptions.Redis.MaxMessageSize > 0)
|
||||||
|
redis.MaxMessageSize = cacheOptions.Redis.MaxMessageSize;
|
||||||
|
|
||||||
|
// 注入 Redis 缓存提供者
|
||||||
|
services.AddSingleton<ICacheProvider>(u => new RedisCacheProvider(u) { Cache = redis });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 内存缓存兜底。在没有配置Redis时,使用内存缓存,逻辑代码无需修改
|
||||||
|
services.TryAddSingleton<ICacheProvider, CacheProvider>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SqlSugar二级缓存
|
||||||
|
/// </summary>
|
||||||
|
public class SqlSugarCache : ICacheService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 系统缓存服务
|
||||||
|
/// </summary>
|
||||||
|
private static readonly SysCacheService _cache = App.GetRequiredService<SysCacheService>();
|
||||||
|
|
||||||
|
public void Add<V>(string key, V value)
|
||||||
|
{
|
||||||
|
_cache.Set($"{CacheConst.SqlSugar}{key}", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Add<V>(string key, V value, int cacheDurationInSeconds)
|
||||||
|
{
|
||||||
|
_cache.Set($"{CacheConst.SqlSugar}{key}", value, TimeSpan.FromSeconds(cacheDurationInSeconds));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ContainsKey<V>(string key)
|
||||||
|
{
|
||||||
|
return _cache.ExistKey($"{CacheConst.SqlSugar}{key}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public V Get<V>(string key)
|
||||||
|
{
|
||||||
|
return _cache.Get<V>($"{CacheConst.SqlSugar}{key}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<string> GetAllKey<V>()
|
||||||
|
{
|
||||||
|
return _cache.GetKeysByPrefixKey(CacheConst.SqlSugar);
|
||||||
|
}
|
||||||
|
|
||||||
|
public V GetOrCreate<V>(string key, Func<V> create, int cacheDurationInSeconds = int.MaxValue)
|
||||||
|
{
|
||||||
|
return _cache.GetOrAdd<V>($"{CacheConst.SqlSugar}{key}", (cacheKey) =>
|
||||||
|
{
|
||||||
|
return create();
|
||||||
|
}, cacheDurationInSeconds);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove<V>(string key)
|
||||||
|
{
|
||||||
|
_cache.Remove(key); // SqlSugar调用Remove方法时,key中已包含了CacheConst.SqlSugar前缀
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付宝支付常量
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
public class AlipayConst
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 单笔无密转账【业务场景】固定值
|
||||||
|
/// </summary>
|
||||||
|
public const string BizScene = "DIRECT_TRANSFER";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单笔无密转账【销售产品码】固定值
|
||||||
|
/// </summary>
|
||||||
|
public const string ProductCode = "TRANS_ACCOUNT_NO_PWD";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易状态参数名
|
||||||
|
/// </summary>
|
||||||
|
public const string TradeStatus = "trade_status";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易成功标识
|
||||||
|
/// </summary>
|
||||||
|
public const string TradeSuccess = "TRADE_SUCCESS";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 授权类型
|
||||||
|
/// </summary>
|
||||||
|
public const string GrantType = "authorization_code";
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 缓存相关常量
|
||||||
|
/// </summary>
|
||||||
|
public class CacheConst
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户权限缓存(按钮集合)
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyUserButton = "sys_user_button:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户机构缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyUserOrg = "sys_user_org:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色最大数据范围缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyRoleMaxDataScope = "sys_role_maxDataScope:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 在线用户缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyUserOnline = "sys_user_online:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图形验证码缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyVerCode = "sys_verCode:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 手机验证码缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyPhoneVerCode = "sys_phoneVerCode:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码错误次数缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyPasswordErrorTimes = "sys_password_error_times:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyTenant = "sys_tenant";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 常量下拉框
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyConst = "sys_const:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所有缓存关键字集合
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyAll = "sys_keys";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SqlSugar二级缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string SqlSugar = "sys_sqlSugar:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开放接口身份缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyOpenAccess = "sys_open_access:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开放接口身份随机数缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyOpenAccessNonce = "sys_open_access_nonce:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登录黑名单
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyBlacklist = "sys_blacklist:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统配置缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyConfig = "sys_config:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统租户配置缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyTenantConfig = "sys_tenant_config:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户配置缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyUserConfig = "sys_user_config:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统字典缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyDict = "sys_dict:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统租户字典缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyTenantDict = "sys_tenant_dict:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重复请求(幂等)字典缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyIdempotent = "sys_idempotent:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Excel临时文件缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeyExcelTemp = "sys_excel_temp:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统更新命令日志缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeySysUpdateLog = "sys_update_log";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统更新间隔标记缓存
|
||||||
|
/// </summary>
|
||||||
|
public const string KeySysUpdateInterval = "sys_update_interval";
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Claim相关常量
|
||||||
|
/// </summary>
|
||||||
|
public class ClaimConst
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
public const string UserId = "UserId";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号
|
||||||
|
/// </summary>
|
||||||
|
public const string Account = "Account";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 真实姓名
|
||||||
|
/// </summary>
|
||||||
|
public const string RealName = "RealName";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 昵称
|
||||||
|
/// </summary>
|
||||||
|
public const string NickName = "NickName";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号类型
|
||||||
|
/// </summary>
|
||||||
|
public const string AccountType = "AccountType";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
public const string TenantId = "TenantId";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组织机构Id
|
||||||
|
/// </summary>
|
||||||
|
public const string OrgId = "OrgId";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组织机构名称
|
||||||
|
/// </summary>
|
||||||
|
public const string OrgName = "OrgName";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组织机构类型
|
||||||
|
/// </summary>
|
||||||
|
public const string OrgType = "OrgType";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 微信OpenId
|
||||||
|
/// </summary>
|
||||||
|
public const string OpenId = "OpenId";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登录模式PC、APP
|
||||||
|
/// </summary>
|
||||||
|
public const string LoginMode = "LoginMode";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 语言代码
|
||||||
|
/// </summary>
|
||||||
|
public const string LangCode = "LangCode";
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 通用常量
|
||||||
|
/// </summary>
|
||||||
|
[Const("平台配置")]
|
||||||
|
public class CommonConst
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 日志分组名称
|
||||||
|
/// </summary>
|
||||||
|
public const string SysLogCategoryName = "System.Logging.LoggingMonitor";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 事件-增加异常日志
|
||||||
|
/// </summary>
|
||||||
|
public const string AddExLog = "Add:ExLog";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 事件-发送异常邮件
|
||||||
|
/// </summary>
|
||||||
|
public const string SendErrorMail = "Send:ErrorMail";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认基本角色名称
|
||||||
|
/// </summary>
|
||||||
|
public const string DefaultBaseRoleName = "默认基本角色";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认基本角色编码
|
||||||
|
/// </summary>
|
||||||
|
public const string DefaultBaseRoleCode = "default_base_role";
|
||||||
|
}
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 配置常量
|
||||||
|
/// </summary>
|
||||||
|
public class ConfigConst
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 演示环境
|
||||||
|
/// </summary>
|
||||||
|
public const string SysDemoEnv = "sys_demo";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认密码
|
||||||
|
/// </summary>
|
||||||
|
public const string SysPassword = "sys_password";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码最大错误次数
|
||||||
|
/// </summary>
|
||||||
|
public const string SysPasswordMaxErrorTimes = "sys_password_max_error_times";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志保留天数
|
||||||
|
/// </summary>
|
||||||
|
public const string SysLogRetentionDays = "sys_log_retention_days";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 记录操作日志
|
||||||
|
/// </summary>
|
||||||
|
public const string SysOpLog = "sys_oplog";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单设备登录
|
||||||
|
/// </summary>
|
||||||
|
public const string SysSingleLogin = "sys_single_login";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登入登出提醒
|
||||||
|
/// </summary>
|
||||||
|
public const string SysLoginOutReminder = "sys_login_out_reminder";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登陆时隐藏租户
|
||||||
|
/// </summary>
|
||||||
|
public const string SysHideTenantLogin = "sys_hide_tenant_login";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登录二次验证
|
||||||
|
/// </summary>
|
||||||
|
public const string SysSecondVer = "sys_second_ver";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图形验证码
|
||||||
|
/// </summary>
|
||||||
|
public const string SysCaptcha = "sys_captcha";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Token过期时间
|
||||||
|
/// </summary>
|
||||||
|
public const string SysTokenExpire = "sys_token_expire";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// RefreshToken过期时间
|
||||||
|
/// </summary>
|
||||||
|
public const string SysRefreshTokenExpire = "sys_refresh_token_expire";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发送异常日志邮件
|
||||||
|
/// </summary>
|
||||||
|
public const string SysErrorMail = "sys_error_mail";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 域登录验证
|
||||||
|
/// </summary>
|
||||||
|
public const string SysDomainLogin = "sys_domain_login";
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// 租户域名隔离登录验证
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysTenantHostLogin = "sys_tenant_host_login";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据校验日志
|
||||||
|
/// </summary>
|
||||||
|
public const string SysValidationLog = "sys_validation_log";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 行政区域同步层级 1-省级,2-市级,3-区县级,4-街道级,5-村级
|
||||||
|
/// </summary>
|
||||||
|
public const string SysRegionSyncLevel = "sys_region_sync_level";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default 分组
|
||||||
|
/// </summary>
|
||||||
|
public const string SysDefaultGroup = "Default";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付宝授权页面地址
|
||||||
|
/// </summary>
|
||||||
|
public const string AlipayAuthPageUrl = "alipay_auth_page_url_";
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// 系统图标
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysWebLogo = "sys_web_logo";
|
||||||
|
//
|
||||||
|
// /// <summary>
|
||||||
|
// /// 系统主标题
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysWebTitle = "sys_web_title";
|
||||||
|
//
|
||||||
|
// /// <summary>
|
||||||
|
// /// 系统副标题
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysWebViceTitle = "sys_web_viceTitle";
|
||||||
|
//
|
||||||
|
// /// <summary>
|
||||||
|
// /// 系统描述
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysWebViceDesc = "sys_web_viceDesc";
|
||||||
|
//
|
||||||
|
// /// <summary>
|
||||||
|
// /// 水印内容
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysWebWatermark = "sys_web_watermark";
|
||||||
|
//
|
||||||
|
// /// <summary>
|
||||||
|
// /// 版权说明
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysWebCopyright = "sys_web_copyright";
|
||||||
|
//
|
||||||
|
// /// <summary>
|
||||||
|
// /// ICP备案号
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysWebIcp = "sys_web_icp";
|
||||||
|
//
|
||||||
|
// /// <summary>
|
||||||
|
// /// ICP地址
|
||||||
|
// /// </summary>
|
||||||
|
// public const string SysWebIcpUrl = "sys_web_icpUrl";
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SqlSugar相关常量
|
||||||
|
/// </summary>
|
||||||
|
public class SqlSugarConst
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 默认主数据库标识(默认租户)
|
||||||
|
/// </summary>
|
||||||
|
public const string MainConfigId = "1300000000001";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认日志数据库标识
|
||||||
|
/// </summary>
|
||||||
|
public const string LogConfigId = "1300000000002";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认表主键
|
||||||
|
/// </summary>
|
||||||
|
public const string PrimaryKey = "Id";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认租户Id
|
||||||
|
/// </summary>
|
||||||
|
public const long DefaultTenantId = 1300000000001;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using Elastic.Clients.Elasticsearch;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ES客户端容器
|
||||||
|
/// </summary>
|
||||||
|
public class ElasticSearchClientContainer
|
||||||
|
{
|
||||||
|
private readonly Dictionary<EsClientTypeEnum, ElasticsearchClient> _clients;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化容器(通过字典注入所有客户端)
|
||||||
|
/// </summary>
|
||||||
|
public ElasticSearchClientContainer(Dictionary<EsClientTypeEnum, ElasticsearchClient> clients)
|
||||||
|
{
|
||||||
|
_clients = clients ?? throw new ArgumentNullException(nameof(clients));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志专用客户端
|
||||||
|
/// </summary>
|
||||||
|
public ElasticsearchClient Logging => GetClient(EsClientTypeEnum.Logging);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 业务数据同步客户端
|
||||||
|
/// </summary>
|
||||||
|
public ElasticsearchClient Business => GetClient(EsClientTypeEnum.Business);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据类型获取客户端(内部校验,避免未注册的类型)
|
||||||
|
/// </summary>
|
||||||
|
private ElasticsearchClient GetClient(EsClientTypeEnum type)
|
||||||
|
{
|
||||||
|
if (_clients.TryGetValue(type, out var client))
|
||||||
|
{
|
||||||
|
return client;
|
||||||
|
}
|
||||||
|
throw new KeyNotFoundException($"未注册的ES客户端类型:{type},请检查注册配置");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using Elastic.Clients.Elasticsearch;
|
||||||
|
using Elastic.Transport;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
public class ElasticSearchClientFactory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 创建 ES 客户端(通用方法)
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TOptions">配置类型(支持通用或场景专用)</typeparam>
|
||||||
|
/// <param name="configPath">配置文件路径(如 "ElasticSearch:Logging")</param>
|
||||||
|
/// <returns>ES 客户端实例(或 null if 未启用)</returns>
|
||||||
|
public static ElasticsearchClient? CreateClient<TOptions>(string configPath) where TOptions : ElasticSearchOptions, new()
|
||||||
|
{
|
||||||
|
// 从配置文件读取当前场景的配置
|
||||||
|
var options = App.GetConfig<TOptions>(configPath);
|
||||||
|
if (options == null)
|
||||||
|
throw Oops.Oh($"未找到{configPath}配置项");
|
||||||
|
|
||||||
|
if (!options.Enabled)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// 验证服务地址
|
||||||
|
if (options.ServerUris == null || !options.ServerUris.Any())
|
||||||
|
throw new ArgumentException($"ES 配置 {configPath} 未设置 ServerUris");
|
||||||
|
|
||||||
|
// 构建连接池(支持集群)
|
||||||
|
var uris = options.ServerUris.Select(uri => new Uri(uri)).ToList();
|
||||||
|
var connectionPool = new StaticNodePool(uris);
|
||||||
|
var connectionSettings = new ElasticsearchClientSettings(connectionPool)
|
||||||
|
.DefaultIndex(options.DefaultIndex) // 设置默认索引
|
||||||
|
.DisableDirectStreaming() // 开启请求/响应日志,方便排查问题
|
||||||
|
.OnRequestCompleted(response =>
|
||||||
|
{
|
||||||
|
if (response.HttpStatusCode == 401)
|
||||||
|
{
|
||||||
|
Console.WriteLine("ES 请求被拒绝:未提供有效认证信息");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 配置认证
|
||||||
|
ConfigureAuthentication(connectionSettings, options);
|
||||||
|
|
||||||
|
// 配置 HTTPS 证书指纹
|
||||||
|
if (!string.IsNullOrEmpty(options.Fingerprint))
|
||||||
|
connectionSettings.CertificateFingerprint(options.Fingerprint);
|
||||||
|
|
||||||
|
return new ElasticsearchClient(connectionSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 配置认证(通用逻辑)
|
||||||
|
/// </summary>
|
||||||
|
private static void ConfigureAuthentication(ElasticsearchClientSettings settings, ElasticSearchOptions options)
|
||||||
|
{
|
||||||
|
switch (options.AuthType)
|
||||||
|
{
|
||||||
|
case ElasticSearchAuthTypeEnum.Basic:
|
||||||
|
settings.Authentication(new BasicAuthentication(options.User, options.Password));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ElasticSearchAuthTypeEnum.ApiKey:
|
||||||
|
settings.Authentication(new ApiKey(options.ApiKey));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ElasticSearchAuthTypeEnum.Base64ApiKey:
|
||||||
|
settings.Authentication(new Base64ApiKey(options.Base64ApiKey));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ElasticSearchAuthTypeEnum.None:
|
||||||
|
// 无需认证
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(options.AuthType));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using Elastic.Clients.Elasticsearch;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core.ElasticSearch;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ES服务注册
|
||||||
|
/// </summary>
|
||||||
|
public static class ElasticSearchSetup
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 注册所有ES客户端(日志+业务)
|
||||||
|
/// </summary>
|
||||||
|
public static void AddElasticSearchClients(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
// 1. 创建客户端字典(枚举→客户端实例)
|
||||||
|
var clients = new Dictionary<EsClientTypeEnum, ElasticsearchClient>();
|
||||||
|
|
||||||
|
// 2. 注册日志客户端
|
||||||
|
var loggingClient = ElasticSearchClientFactory.CreateClient<ElasticSearchOptions>(configPath: "ElasticSearch:Logging");
|
||||||
|
if (loggingClient != null)
|
||||||
|
{
|
||||||
|
clients[EsClientTypeEnum.Logging] = loggingClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 注册业务客户端
|
||||||
|
var businessClient = ElasticSearchClientFactory.CreateClient<ElasticSearchOptions>(configPath: "ElasticSearch:Business");
|
||||||
|
if (businessClient != null)
|
||||||
|
{
|
||||||
|
clients[EsClientTypeEnum.Business] = businessClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 将客户端容器注册为单例(全局唯一)
|
||||||
|
services.AddSingleton(new ElasticSearchClientContainer(clients));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 框架实体基类Id
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 雪花Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", ColumnDescription = "主键Id", IsPrimaryKey = true, IsIdentity = false)]
|
||||||
|
public virtual long Id { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 框架实体基类
|
||||||
|
/// </summary>
|
||||||
|
[SugarIndex("index_{table}_CT", nameof(CreateTime), OrderByType.Asc)]
|
||||||
|
public abstract class EntityBase : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "创建时间", IsNullable = true, IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "更新时间")]
|
||||||
|
public virtual DateTime? UpdateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建者Id
|
||||||
|
/// </summary>
|
||||||
|
[OwnerUser]
|
||||||
|
[SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual long? CreateUserId { get; set; }
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 创建者
|
||||||
|
///// </summary>
|
||||||
|
//[Newtonsoft.Json.JsonIgnore]
|
||||||
|
//[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
//[Navigate(NavigateType.OneToOne, nameof(CreateUserId))]
|
||||||
|
//public virtual SysUser CreateUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建者姓名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "创建者姓名", Length = 64, IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual string? CreateUserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改者Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "修改者Id")]
|
||||||
|
public virtual long? UpdateUserId { get; set; }
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 修改者
|
||||||
|
///// </summary>
|
||||||
|
//[Newtonsoft.Json.JsonIgnore]
|
||||||
|
//[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
//[Navigate(NavigateType.OneToOne, nameof(UpdateUserId))]
|
||||||
|
//public virtual SysUser UpdateUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改者姓名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "修改者姓名", Length = 64)]
|
||||||
|
public virtual string? UpdateUserName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 框架实体基类(删除标志)
|
||||||
|
/// </summary>
|
||||||
|
[SugarIndex("index_{table}_D", nameof(IsDelete), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_DT", nameof(DeleteTime), OrderByType.Asc)]
|
||||||
|
public abstract class EntityBaseDel : EntityBase, IDeletedFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 软删除
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "软删除")]
|
||||||
|
public virtual bool IsDelete { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 软删除时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "软删除时间")]
|
||||||
|
public virtual DateTime? DeleteTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构实体基类(数据权限)
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EntityBaseOrg : EntityBase, IOrgIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 机构Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "机构Id", IsNullable = true)]
|
||||||
|
public virtual long OrgId { get; set; }
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 创建者部门Id
|
||||||
|
///// </summary>
|
||||||
|
//[SugarColumn(ColumnDescription = "创建者部门Id", IsOnlyIgnoreUpdate = true)]
|
||||||
|
//public virtual long? CreateOrgId { get; set; }
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 创建者部门
|
||||||
|
///// </summary>
|
||||||
|
//[Newtonsoft.Json.JsonIgnore]
|
||||||
|
//[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
//[Navigate(NavigateType.OneToOne, nameof(CreateOrgId))]
|
||||||
|
//public virtual SysOrg CreateOrg { get; set; }
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 创建者部门名称
|
||||||
|
///// </summary>
|
||||||
|
//[SugarColumn(ColumnDescription = "创建者部门名称", Length = 64, IsOnlyIgnoreUpdate = true)]
|
||||||
|
//public virtual string? CreateOrgName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构实体基类(数据权限、删除标志)
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EntityBaseOrgDel : EntityBaseDel, IOrgIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 机构Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "机构Id", IsNullable = true)]
|
||||||
|
public virtual long OrgId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户实体基类
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EntityBaseTenant : EntityBase, ITenantIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual long? TenantId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户实体基类(删除标志)
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EntityBaseTenantDel : EntityBaseDel, ITenantIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual long? TenantId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户实体基类Id
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EntityBaseTenantId : EntityBaseId, ITenantIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual long? TenantId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户机构实体基类(数据权限)
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EntityBaseTenantOrg : EntityBaseOrg, ITenantIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual long? TenantId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户机构实体基类(数据权限、删除标志)
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EntityBaseTenantOrgDel : EntityBaseOrgDel, ITenantIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual long? TenantId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 假删除接口过滤器
|
||||||
|
/// </summary>
|
||||||
|
public interface IDeletedFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 软删除
|
||||||
|
/// </summary>
|
||||||
|
bool IsDelete { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id接口过滤器
|
||||||
|
/// </summary>
|
||||||
|
public interface ITenantIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
long? TenantId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构Id接口过滤器
|
||||||
|
/// </summary>
|
||||||
|
public interface IOrgIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 机构Id
|
||||||
|
/// </summary>
|
||||||
|
long OrgId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付宝授权记录表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "支付宝授权记录表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_U", nameof(UserId), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_T", nameof(OpenId), OrderByType.Asc)]
|
||||||
|
public class SysAlipayAuthInfo : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 商户AppId
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "商户AppId", Length = 64)]
|
||||||
|
public string? AppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开放ID
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "开放ID", Length = 64)]
|
||||||
|
public string? OpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户ID
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户ID", Length = 64)]
|
||||||
|
public string? UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 性别
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "性别", Length = 8)]
|
||||||
|
public GenderEnum Gender { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 年龄
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "年龄", Length = 16)]
|
||||||
|
public int Age { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 手机号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "手机号", Length = 32)]
|
||||||
|
public string Mobile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "显示名称", Length = 128)]
|
||||||
|
public string DisplayName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 昵称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "昵称", Length = 64)]
|
||||||
|
public string NickName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户名", Length = 64)]
|
||||||
|
public string UserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 头像
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "头像", Length = 512)]
|
||||||
|
public string? Avatar { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮箱
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "邮箱", Length = 128)]
|
||||||
|
public string? Email { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户民族
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户民族", Length = 32)]
|
||||||
|
public string? UserNation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 淘宝ID
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "淘宝ID", Length = 64)]
|
||||||
|
public string? TaobaoId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 电话
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "电话", Length = 32)]
|
||||||
|
public string? Phone { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生日
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "生日", Length = 32)]
|
||||||
|
public string? PersonBirthday { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职业
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职业", Length = 64)]
|
||||||
|
public string? Profession { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 省份
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "省份", Length = 64)]
|
||||||
|
public string? Province { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户状态", Length = 32)]
|
||||||
|
public string? UserStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 学历
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "学历", Length = 32)]
|
||||||
|
public string? Degree { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户类型", Length = 32)]
|
||||||
|
public string? UserType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮编
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "邮编", Length = 16)]
|
||||||
|
public string? Zip { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "地址", Length = 256)]
|
||||||
|
public string? Address { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付宝交易记录表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "支付宝交易记录表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_U", nameof(UserId), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_T", nameof(TradeNo), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_O", nameof(OutTradeNo), OrderByType.Asc)]
|
||||||
|
public class SysAlipayTransaction : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id", Length = 64)]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易号", Length = 64)]
|
||||||
|
public string? TradeNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 商户订单号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "商户订单号", Length = 64)]
|
||||||
|
public string OutTradeNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易金额
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易金额", Length = 20)]
|
||||||
|
public decimal TotalAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易状态", Length = 32)]
|
||||||
|
public string TradeStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易完成时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易完成时间")]
|
||||||
|
public DateTime? FinishTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易标题
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易标题", Length = 256)]
|
||||||
|
public string Subject { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易描述
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易描述", Length = 512)]
|
||||||
|
public string? Body { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 买家支付宝账号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "买家支付宝账号", Length = 128)]
|
||||||
|
public string? BuyerLogonId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 买家支付宝用户ID
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "买家支付宝用户ID", Length = 32)]
|
||||||
|
public string? BuyerUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 卖家支付宝用户ID
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "卖家支付宝用户ID", Length = 32)]
|
||||||
|
public string? SellerUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 商户AppId
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "商户AppId", Length = 64)]
|
||||||
|
public string? AppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易扩展信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易扩展信息", Length = 1024)]
|
||||||
|
public string? ExtendInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易异常信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易扩展信息", Length = 1024)]
|
||||||
|
public string? ErrorInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易备注", Length = 512)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 代码生成表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "代码生成表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_B", nameof(BusName), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_T", nameof(TableName), OrderByType.Asc)]
|
||||||
|
public partial class SysCodeGen : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 作者姓名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "作者姓名", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? AuthorName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否移除表前缀
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否移除表前缀", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? TablePrefix { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成方式
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "生成方式", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? GenerateType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 库定位器名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "库定位器名", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? ConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 库名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string DbNickName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dbOptions = App.GetConfig<DbConnectionOptions>("DbConnection", true);
|
||||||
|
var config = dbOptions.ConnectionConfigs.FirstOrDefault(m => m.ConfigId.ToString() == ConfigId);
|
||||||
|
return config.DbNickName;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库名(保留字段)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据库库名", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? DbName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据库类型", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? DbType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库链接
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据库链接", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? ConnectionString { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库表名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据库表名", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? TableName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 命名空间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "命名空间", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? NameSpace { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 业务名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "业务名", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? BusName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 表唯一字段配置
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "表唯一字段配置", Length = 512)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? TableUniqueConfig { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否生成菜单
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否生成菜单")]
|
||||||
|
public bool GenerateMenu { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单图标
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "菜单图标", Length = 32)]
|
||||||
|
public string? MenuIcon { get; set; } = "ele-Menu";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "菜单编码")]
|
||||||
|
public long? MenuPid { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 页面目录
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "页面目录", Length = 32)]
|
||||||
|
public string? PagePath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支持打印类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "支持打印类型", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? PrintType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打印模版名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "打印模版名称", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? PrintName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 表唯一字段列表
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public virtual List<TableUniqueConfigItem> TableUniqueList => string.IsNullOrWhiteSpace(TableUniqueConfig) ? null : JSON.Deserialize<List<TableUniqueConfigItem>>(TableUniqueConfig);
|
||||||
|
}
|
||||||
@@ -0,0 +1,207 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 代码生成字段配置表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "代码生成字段配置表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysCodeGenConfig : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 代码生成主表Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "主表Id")]
|
||||||
|
public long CodeGenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库字段名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "字段名称", Length = 128)]
|
||||||
|
[Required, MaxLength(128)]
|
||||||
|
public virtual string ColumnName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "主键", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? ColumnKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实体属性名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "属性名称", Length = 128)]
|
||||||
|
[Required, MaxLength(128)]
|
||||||
|
public virtual string PropertyName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字段数据长度
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "字段数据长度", DefaultValue = "0")]
|
||||||
|
public int ColumnLength { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字段描述
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "字段描述", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? ColumnComment { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库中类型(物理类型)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据库中类型", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? DataType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// .NET数据类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "NET数据类型", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? NetType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字段数据默认值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "默认值")]
|
||||||
|
public string? DefaultValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 作用类型(字典)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "作用类型", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? EffectType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外键库标识
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "外键库标识", Length = 20)]
|
||||||
|
[MaxLength(20)]
|
||||||
|
public string? FkConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外键实体名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "外键实体名称", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? FkEntityName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外键表名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "外键表名称", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? FkTableName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外键显示字段
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "外键显示字段", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? FkDisplayColumns { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外键链接字段
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "外键链接字段", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? FkLinkColumnName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外键显示字段.NET类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "外键显示字段.NET类型", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? FkColumnNetType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 父级字段
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "父级字段", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? PidColumn { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "字典编码", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? DictTypeCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询方式
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "查询方式", Length = 16)]
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? QueryType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是查询条件
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否是查询条件", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? WhetherQuery { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 列表是否缩进(字典)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "列表是否缩进", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? WhetherRetract { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否必填(字典)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否必填", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? WhetherRequired { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否可排序(字典)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否可排序", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? WhetherSortable { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 列表显示
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "列表显示", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? WhetherTable { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 增改
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "增改", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? WhetherAddUpdate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 导入
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "导入", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? WhetherImport { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否通用字段
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否通用字段", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? WhetherCommon { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统配置参数表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统配置参数表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc, IsUnique = true)]
|
||||||
|
public partial class SysConfig : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "编码", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 参数值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "参数值", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
[IgnoreUpdateSeedColumn]
|
||||||
|
public string? Value { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是内置参数(Y-是,N-否)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否是内置参数", DefaultValue = "1")]
|
||||||
|
public YesNoEnum SysFlag { get; set; } = YesNoEnum.Y;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分组编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "分组编码", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? GroupCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序", DefaultValue = "100")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统字典值表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统字典值表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_TV", nameof(DictTypeId), OrderByType.Asc, nameof(Value), OrderByType.Asc, IsUnique = true)]
|
||||||
|
public partial class SysDictData : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 字典类型Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "字典类型Id")]
|
||||||
|
public long DictTypeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典类型
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(DictTypeId))]
|
||||||
|
public SysDictType DictType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示文本
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "显示文本", Length = 256)]
|
||||||
|
[Required, MaxLength(256)]
|
||||||
|
public virtual string Label { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "值", Length = 256)]
|
||||||
|
[Required, MaxLength(256)]
|
||||||
|
public virtual string Value { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// </remarks>
|
||||||
|
[SugarColumn(ColumnDescription = "编码", Length = 256)]
|
||||||
|
public virtual string? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public virtual string? Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示样式-标签颜色
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "显示样式-标签颜色", Length = 16)]
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? TagType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示样式-Style(控制显示样式)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "显示样式-Style", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? StyleSetting { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示样式-Class(控制显示样式)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "显示样式-Class", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? ClassSetting { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序", DefaultValue = "100")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 2048)]
|
||||||
|
[MaxLength(2048)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拓展数据(保存业务功能的配置项)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "拓展数据(保存业务功能的配置项)", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? ExtData { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态", DefaultValue = "1")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统租户字典值表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统租户字典值表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_TV", nameof(DictTypeId), OrderByType.Asc, nameof(Value), OrderByType.Asc)]
|
||||||
|
public partial class SysDictDataTenant : SysDictData, ITenantIdFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)]
|
||||||
|
public virtual long? TenantId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统字典类型表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统字典类型表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)]
|
||||||
|
public partial class SysDictType : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "编码", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序", DefaultValue = "100")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态", DefaultValue = "1")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是内置字典(Y-是,N-否)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否是内置字典", DefaultValue = "1")]
|
||||||
|
public virtual YesNoEnum SysFlag { get; set; } = YesNoEnum.Y;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是租户字典(Y-是,N-否)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否是租户字典", DefaultValue = "2")]
|
||||||
|
public virtual YesNoEnum IsTenant { get; set; } = YesNoEnum.N;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典值集合
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(SysDictData.DictTypeId))]
|
||||||
|
public List<SysDictData> Children { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统文件表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统文件表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_F", nameof(FileName), OrderByType.Asc)]
|
||||||
|
public partial class SysFile : EntityBaseTenantOrg
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 提供者
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "提供者", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Provider { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 仓储名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "仓储名称", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? BucketName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件名称(源文件名)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "文件名称", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? FileName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件后缀
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "文件后缀", Length = 16)]
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? Suffix { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储路径
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "存储路径", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? FilePath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件大小KB
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "文件大小KB")]
|
||||||
|
public long SizeKb { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件大小信息-计算后的
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "文件大小信息", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? SizeInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外链地址-OSS上传后生成外链地址方便前端预览
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "外链地址", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? Url { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件MD5
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "文件MD5", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? FileMd5 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件类别
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "文件类别", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public virtual string? FileType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件别名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "文件别名", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? FileAlias { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否公开
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否公开")]
|
||||||
|
public virtual bool IsPublic { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 业务数据Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "业务数据Id")]
|
||||||
|
public long? DataId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统文件存储提供者表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统文件存储提供者表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_BucketName", nameof(BucketName), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_IsEnable", nameof(IsEnable), OrderByType.Desc)]
|
||||||
|
[SugarIndex("index_{table}_IsDefault", nameof(IsDefault), OrderByType.Desc)]
|
||||||
|
public partial class SysFileProvider : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 存储提供者(Minio, QCloud,Aliyun 等等)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "存储提供者", Length = 16)]
|
||||||
|
[Required, MaxLength(16)]
|
||||||
|
public virtual string Provider { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储桶名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "存储桶名称", Length = 32)]
|
||||||
|
[Required, MaxLength(32)]
|
||||||
|
public virtual string BucketName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 访问密钥 (填入 阿里云(Aliyun)/Minio:的 AccessKey,腾讯云(QCloud): 的 SecretId)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "访问密钥", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public virtual string? AccessKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密钥
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "密钥", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public virtual string? SecretKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 地域
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "地域", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public virtual string? Region { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 端点地址(填入 阿里云(Aliyun)/Minio:的 endpoint/Api address,腾讯云(QCloud): 的 AppId)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "端点地址", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public virtual string? Endpoint { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用HTTPS
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否启用HTTPS")]
|
||||||
|
public virtual bool? IsEnableHttps { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用缓存
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否启用缓存")]
|
||||||
|
public virtual bool? IsEnableCache { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否启用")]
|
||||||
|
public virtual bool? IsEnable { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否默认提供者
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否默认提供者")]
|
||||||
|
public virtual bool? IsDefault { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义域名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "自定义域名", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public virtual string? SinceDomain { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序号")]
|
||||||
|
public virtual int? OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public virtual string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取显示名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public virtual string DisplayName => $"{Provider}-{BucketName}";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取配置键名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public virtual string ConfigKey => $"{Provider}_{BucketName}_{Id}";
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统作业集群表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统作业集群表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysJobCluster : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 作业集群Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "作业集群Id", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string ClusterId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "描述信息", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public ClusterStatus Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "更新时间")]
|
||||||
|
public DateTime? UpdatedTime { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统作业信息表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统作业信息表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_J", nameof(JobId), OrderByType.Asc)]
|
||||||
|
public partial class SysJobDetail : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 作业Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "作业Id", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string JobId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "组名称", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? GroupName { get; set; } = "default";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 作业类型FullName
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "作业类型", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? JobType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 程序集Name
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "程序集", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? AssemblyName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "描述信息", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否并行执行
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否并行执行")]
|
||||||
|
public bool Concurrent { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否扫描特性触发器
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否扫描特性触发器", ColumnName = "annotation")]
|
||||||
|
public bool IncludeAnnotation { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 额外数据
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "额外数据", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? Properties { get; set; } = "{}";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "更新时间")]
|
||||||
|
public DateTime? UpdatedTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 作业创建类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "作业创建类型")]
|
||||||
|
public JobCreateTypeEnum CreateType { get; set; } = JobCreateTypeEnum.BuiltIn;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 脚本代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "脚本代码", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? ScriptCode { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统作业触发器表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统作业触发器表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysJobTrigger : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 触发器Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "触发器Id", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string TriggerId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 作业Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "作业Id", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string JobId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 触发器类型FullName
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "触发器类型", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? TriggerType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 程序集Name
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "程序集", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? AssemblyName { get; set; } = "Furion.Pure";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 参数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "参数", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Args { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "描述信息", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public TriggerStatus Status { get; set; } = TriggerStatus.Ready;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 起始时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "起始时间")]
|
||||||
|
public DateTime? StartTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "结束时间")]
|
||||||
|
public DateTime? EndTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最近运行时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最近运行时间")]
|
||||||
|
public DateTime? LastRunTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 下一次运行时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "下一次运行时间")]
|
||||||
|
public DateTime? NextRunTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 触发次数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "触发次数")]
|
||||||
|
public long NumberOfRuns { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大触发次数(0:不限制,n:N次)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最大触发次数")]
|
||||||
|
public long MaxNumberOfRuns { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 出错次数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "出错次数")]
|
||||||
|
public long NumberOfErrors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大出错次数(0:不限制,n:N次)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最大出错次数")]
|
||||||
|
public long MaxNumberOfErrors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重试次数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "重试次数")]
|
||||||
|
public int NumRetries { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重试间隔时间(ms)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "重试间隔时间(ms)")]
|
||||||
|
public int RetryTimeout { get; set; } = 1000;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否立即启动
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否立即启动")]
|
||||||
|
public bool StartNow { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启动时执行一次
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否启动时执行一次")]
|
||||||
|
public bool RunOnStart { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否在启动时重置最大触发次数等于一次的作业
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否重置触发次数")]
|
||||||
|
public bool ResetOnlyOnce { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "更新时间")]
|
||||||
|
public DateTime? UpdatedTime { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统作业触发器运行记录表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统作业触发器运行记录表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysJobTriggerRecord : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 作业Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "作业Id", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string JobId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 触发器Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "触发器Id", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string TriggerId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前运行次数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "当前运行次数")]
|
||||||
|
public long NumberOfRuns { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最近运行时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最近运行时间")]
|
||||||
|
public DateTime? LastRunTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 下一次运行时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "下一次运行时间")]
|
||||||
|
public DateTime? NextRunTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 触发器状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "触发器状态")]
|
||||||
|
public TriggerStatus Status { get; set; } = TriggerStatus.Ready;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 本次执行结果
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "本次执行结果", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Result { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 本次执行耗时
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "本次执行耗时")]
|
||||||
|
public long ElapsedTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "创建时间")]
|
||||||
|
public DateTime? CreatedTime { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
[SugarTable(null, "语言配置")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)]
|
||||||
|
public class SysLang : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 语言名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "语言名称")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 语言代码(如 zh-CN)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "语言代码")]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ISO 语言代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "ISO 语言代码")]
|
||||||
|
public string IsoCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// URL 语言代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "URL 语言代码")]
|
||||||
|
public string UrlCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 书写方向(1=从左到右,2=从右到左)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "书写方向", DefaultValue = "1")]
|
||||||
|
public DirectionEnum Direction { get; set; } = DirectionEnum.Ltr;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日期格式(如 YYYY-MM-DD)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "日期格式")]
|
||||||
|
public string DateFormat { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 时间格式(如 HH:MM:SS)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "时间格式")]
|
||||||
|
public string TimeFormat { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 每周起始日(如 0=星期日,1=星期一)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "每周起始日", DefaultValue = "7")]
|
||||||
|
public WeekEnum WeekStart { get; set; } = WeekEnum.Sunday;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分组符号(如 ,)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "分组符号")]
|
||||||
|
public string Grouping { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 小数点符号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "小数点符号")]
|
||||||
|
public string DecimalPoint { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 千分位分隔符
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "千分位分隔符")]
|
||||||
|
public string? ThousandsSep { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否启用")]
|
||||||
|
public bool Active { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
[SugarTable(null, "翻译表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(EntityName), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_F", nameof(FieldName), OrderByType.Asc)]
|
||||||
|
public class SysLangText : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 所属实体名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "所属实体名")]
|
||||||
|
public string EntityName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属实体ID
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "所属实体ID")]
|
||||||
|
public long EntityId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字段名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "字段名")]
|
||||||
|
public string FieldName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 语言代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "语言代码")]
|
||||||
|
public string LangCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 多语言内容
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "翻译内容")]
|
||||||
|
public string Content { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统域登录信息配置表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统域登录信息配置表")]
|
||||||
|
[SysTable]
|
||||||
|
public class SysLdap : EntityBaseTenantDel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主机
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "主机", Length = 128)]
|
||||||
|
[Required]
|
||||||
|
public virtual string Host { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 端口
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "端口")]
|
||||||
|
public virtual int Port { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户搜索基准
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户搜索基准", Length = 128)]
|
||||||
|
[Required]
|
||||||
|
public virtual string BaseDn { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定DN(有管理权限制的用户)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "绑定DN", Length = 128)]
|
||||||
|
[Required]
|
||||||
|
public virtual string BindDn { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定密码(有管理权限制的用户密码)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "绑定密码", Length = 512)]
|
||||||
|
[Required]
|
||||||
|
public virtual string BindPass { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户过滤规则
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户过滤规则", Length = 128)]
|
||||||
|
[Required]
|
||||||
|
public virtual string AuthFilter { get; set; } = "sAMAccountName=%s";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Ldap版本
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "Ldap版本")]
|
||||||
|
public int Version { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定域账号字段属性值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "绑定域账号字段属性值", Length = 32)]
|
||||||
|
[Required]
|
||||||
|
public virtual string BindAttrAccount { get; set; } = "sAMAccountName";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定用户EmployeeId属性值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "绑定用户EmployeeId属性值", Length = 32)]
|
||||||
|
[Required]
|
||||||
|
public virtual string BindAttrEmployeeId { get; set; } = "EmployeeId";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定Code属性值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "绑定对象Code属性值", Length = 64)]
|
||||||
|
[Required]
|
||||||
|
public virtual string BindAttrCode { get; set; } = "objectGUID";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统差异日志表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统差异日志表")]
|
||||||
|
[SysTable]
|
||||||
|
[LogTable]
|
||||||
|
public partial class SysLogDiff : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 差异数据
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "差异数据", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? DiffData { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sql
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "Sql", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? Sql { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 参数 手动传入的参数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "参数", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? Parameters { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 业务对象
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "业务对象", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? BusinessData { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 差异操作
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "差异操作", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? DiffType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 耗时
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "耗时")]
|
||||||
|
public long? Elapsed { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统异常日志表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统异常日志表")]
|
||||||
|
[SysTable]
|
||||||
|
[LogTable]
|
||||||
|
public partial class SysLogEx : SysLogVis
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 请求方式
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求方式", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? HttpMethod { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求地址", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? RequestUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求参数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求参数", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? RequestParam { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 返回结果
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "返回结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? ReturnResult { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 事件Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "事件Id")]
|
||||||
|
public int? EventId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 线程Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "线程Id")]
|
||||||
|
public int? ThreadId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求跟踪Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求跟踪Id", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? TraceId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异常信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "异常信息", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? Exception { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志消息Json
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "日志消息Json", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? Message { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统操作日志表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统操作日志表")]
|
||||||
|
[SysTable]
|
||||||
|
[LogTable]
|
||||||
|
public partial class SysLogOp : SysLogVis
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 请求方式
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求方式", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? HttpMethod { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求地址", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? RequestUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求参数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求参数", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? RequestParam { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 返回结果
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "返回结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? ReturnResult { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 事件Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "事件Id")]
|
||||||
|
public int? EventId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 线程Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "线程Id")]
|
||||||
|
public int? ThreadId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求跟踪Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求跟踪Id", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? TraceId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异常信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "异常信息", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? Exception { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志消息Json
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "日志消息Json", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? Message { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统访问日志表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统访问日志表")]
|
||||||
|
[SysTable]
|
||||||
|
[LogTable]
|
||||||
|
public partial class SysLogVis : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 模块名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "模块名称", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? ControllerName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 方法名称
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnDescription = "方法名称", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? ActionName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示名称
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnDescription = "显示名称", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? DisplayTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 执行状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "执行状态", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IP地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "IP地址", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? RemoteIp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登录地点
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "登录地点", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Location { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 经度
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "经度")]
|
||||||
|
public decimal? Longitude { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 维度
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "维度")]
|
||||||
|
public decimal? Latitude { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 浏览器
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "浏览器", Length = 1024)]
|
||||||
|
[MaxLength(1024)]
|
||||||
|
public string? Browser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作系统
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "操作系统", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? Os { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作用时
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "操作用时")]
|
||||||
|
public long? Elapsed { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "日志时间")]
|
||||||
|
public DateTime? LogDateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志级别
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "日志级别")]
|
||||||
|
public LogLevel? LogLevel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "账号", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? Account { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 真实姓名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "真实姓名", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? RealName { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统菜单表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统菜单表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_T", nameof(Title), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_T2", nameof(Type), OrderByType.Asc)]
|
||||||
|
public partial class SysMenu : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "父Id")]
|
||||||
|
public long Pid { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单类型(1目录 2菜单 3按钮)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "菜单类型")]
|
||||||
|
public MenuTypeEnum Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 路由名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "路由名称", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 路由地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "路由地址", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Path { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组件路径
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "组件路径", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Component { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重定向
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "重定向", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Redirect { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限标识
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "权限标识", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Permission { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "菜单名称", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Title { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图标
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "图标", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Icon { get; set; } = "ele-Menu";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否内嵌
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否内嵌")]
|
||||||
|
public bool IsIframe { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外链链接
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "外链链接", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? OutLink { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否隐藏
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否隐藏")]
|
||||||
|
public bool IsHide { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否缓存
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否缓存")]
|
||||||
|
public bool IsKeepAlive { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否固定
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否固定")]
|
||||||
|
public bool IsAffix { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单子项
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public List<SysMenu> Children { get; set; } = new();
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统通知公告表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统通知公告表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_T", nameof(Type), OrderByType.Asc)]
|
||||||
|
public partial class SysNotice : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 标题
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "标题", Length = 32)]
|
||||||
|
[Required, MaxLength(32)]
|
||||||
|
[SensitiveDetection('*')]
|
||||||
|
public virtual string Title { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 内容
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "内容", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
[Required]
|
||||||
|
[SensitiveDetection('*')]
|
||||||
|
public virtual string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 类型(1通知 2公告)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "类型(1通知 2公告)")]
|
||||||
|
public NoticeTypeEnum Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发布人Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "发布人Id")]
|
||||||
|
public long PublicUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发布人姓名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "发布人姓名", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? PublicUserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发布机构Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "发布机构Id")]
|
||||||
|
public long PublicOrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发布机构名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "发布机构名称", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? PublicOrgName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发布时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "发布时间")]
|
||||||
|
public DateTime? PublicTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 撤回时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "撤回时间")]
|
||||||
|
public DateTime? CancelTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态(0草稿 1发布 2撤回 3删除)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态(0草稿 1发布 2撤回 3删除)")]
|
||||||
|
public NoticeStatusEnum Status { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统通知公告用户表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统通知公告用户表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysNoticeUser : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 通知公告Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "通知公告Id")]
|
||||||
|
public long NoticeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 通知公告
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(NoticeId))]
|
||||||
|
public SysNotice SysNotice { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅读时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "阅读时间")]
|
||||||
|
public DateTime? ReadTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态(0未读 1已读)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态(0未读 1已读)")]
|
||||||
|
public NoticeUserStatusEnum ReadStatus { get; set; } = NoticeUserStatusEnum.UNREAD;
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统在线用户表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统在线用户表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysOnlineUser : EntityBaseTenantId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 连接Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "连接Id")]
|
||||||
|
public string? ConnectionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "账号", Length = 32)]
|
||||||
|
[Required, MaxLength(32)]
|
||||||
|
public virtual string UserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 真实姓名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "真实姓名", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? RealName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 连接时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "连接时间")]
|
||||||
|
public DateTime? Time { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 连接IP
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "连接IP", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? Ip { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 浏览器
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "浏览器", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Browser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作系统
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "操作系统", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Os { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开放接口身份表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "开放接口身份表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_A", nameof(AccessKey), OrderByType.Asc)]
|
||||||
|
public partial class SysOpenAccess : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 身份标识
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "身份标识", Length = 128)]
|
||||||
|
[Required, MaxLength(128)]
|
||||||
|
public virtual string AccessKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密钥
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "密钥", Length = 256)]
|
||||||
|
[Required, MaxLength(256)]
|
||||||
|
public virtual string AccessSecret { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定租户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "绑定租户Id")]
|
||||||
|
public long BindTenantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定租户
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(BindTenantId))]
|
||||||
|
public SysTenant BindTenant { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "绑定用户Id")]
|
||||||
|
public virtual long BindUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定用户
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(BindUserId))]
|
||||||
|
public SysUser BindUser { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统机构表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统机构表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_T", nameof(Type), OrderByType.Asc)]
|
||||||
|
public partial class SysOrg : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "父Id")]
|
||||||
|
public long Pid { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "编码", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 级别
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "级别")]
|
||||||
|
public int? Level { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构类型-数据字典
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "机构类型", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public virtual string? Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 负责人Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "负责人Id", IsNullable = true)]
|
||||||
|
public long? DirectorId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 负责人
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(DirectorId))]
|
||||||
|
public SysUser Director { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构子项
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public List<SysOrg> Children { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否禁止选中
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public bool Disabled { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统动态插件表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统动态插件表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
public partial class SysPlugin : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// C#代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "C#代码", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
[Required]
|
||||||
|
public virtual string CsharpCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 程序集名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "程序集名称", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? AssemblyName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统职位表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统职位表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)]
|
||||||
|
public partial class SysPos : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "编码", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 在职人员
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public List<SysUser> UserList { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统打印模板表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统打印模板表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
public partial class SysPrint : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打印模板
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "打印模板", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
[Required]
|
||||||
|
public virtual string Template { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打印类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "打印类型")]
|
||||||
|
[Required]
|
||||||
|
public virtual PrintTypeEnum? PrintType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户端服务地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "客户端服务地址", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public virtual string? ClientServiceAddress { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打印参数
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "打印参数", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public virtual string? PrintParam { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打印预览测试数据
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "打印预览测试数据", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? PrintDataDemo { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统行政地区表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统行政地区表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc, IsUnique = true)]
|
||||||
|
public partial class SysRegion : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "父Id")]
|
||||||
|
public long Pid { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 128)]
|
||||||
|
[Required, MaxLength(128)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 简称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "简称", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? ShortName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组合名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "组合名", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? MergerName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 行政代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "行政代码", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮政编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "邮政编码", Length = 6)]
|
||||||
|
[MaxLength(6)]
|
||||||
|
public string? ZipCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 区号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "区号", Length = 6)]
|
||||||
|
[MaxLength(6)]
|
||||||
|
public string? CityCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 层级
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "层级")]
|
||||||
|
public int Level { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拼音
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "拼音", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? PinYin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 经度
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "经度")]
|
||||||
|
public float Lng { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 维度
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "维度")]
|
||||||
|
public float Lat { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构子项
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public List<SysRegion> Children { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统角色表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统角色表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)]
|
||||||
|
public partial class SysRole : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "编码", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据范围(1全部数据 2本部门及以下数据 3本部门数据 4仅本人数据 5自定义数据)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据范围")]
|
||||||
|
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.Self;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统角色菜单表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统角色菜单表")]
|
||||||
|
[SysTable]
|
||||||
|
public class SysRoleMenu : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 角色Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "角色Id")]
|
||||||
|
public long RoleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "菜单Id")]
|
||||||
|
public long MenuId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(MenuId))]
|
||||||
|
public SysMenu SysMenu { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统角色机构表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统角色机构表")]
|
||||||
|
[SysTable]
|
||||||
|
public class SysRoleOrg : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 角色Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "角色Id")]
|
||||||
|
public long RoleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "机构Id")]
|
||||||
|
public long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(OrgId))]
|
||||||
|
public SysOrg SysOrg { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统日程表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统日程表")]
|
||||||
|
[SysTable]
|
||||||
|
public class SysSchedule : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日程日期
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "日程日期")]
|
||||||
|
public DateTime? ScheduleTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开始时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "开始时间", Length = 10)]
|
||||||
|
public string? StartTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "结束时间", Length = 10)]
|
||||||
|
public string? EndTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日程内容
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "日程内容", Length = 256)]
|
||||||
|
[Required, MaxLength(256)]
|
||||||
|
public virtual string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "完成状态")]
|
||||||
|
public FinishStatusEnum Status { get; set; } = FinishStatusEnum.UnFinish;
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统模板表
|
||||||
|
/// </summary>
|
||||||
|
[SysTable]
|
||||||
|
[SugarTable(null, "系统模板表")]
|
||||||
|
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc, IsUnique = true)]
|
||||||
|
[SugarIndex("index_{table}_G", nameof(GroupName), OrderByType.Asc)]
|
||||||
|
public partial class SysTemplate : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[MaxLength(128)]
|
||||||
|
[SugarColumn(ColumnDescription = "名称", Length = 128)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分组名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "分组名称")]
|
||||||
|
public virtual TemplateTypeEnum Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[MaxLength(128)]
|
||||||
|
[SugarColumn(ColumnDescription = "编码", Length = 128)]
|
||||||
|
public virtual string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分组名称
|
||||||
|
/// </summary>
|
||||||
|
[MaxLength(32)]
|
||||||
|
[SugarColumn(ColumnDescription = "分组名称", Length = 32)]
|
||||||
|
public virtual string GroupName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模板内容
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "模板内容", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public virtual string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[MaxLength(128)]
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
public virtual string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public virtual int OrderNo { get; set; } = 100;
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统租户表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统租户表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysTenant : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租管用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租管用户Id")]
|
||||||
|
public virtual long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "机构Id")]
|
||||||
|
public virtual long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 域名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "域名", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public virtual string? Host { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租户类型")]
|
||||||
|
public virtual TenantTypeEnum TenantType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据库类型")]
|
||||||
|
public virtual SqlSugar.DbType DbType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库连接
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据库连接", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public virtual string? Connection { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库标识
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "数据库标识", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public virtual string? ConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从库连接/读写分离
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "从库连接/读写分离", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public virtual string? SlaveConnections { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用注册功能
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "启用注册功能")]
|
||||||
|
public virtual YesNoEnum? EnableReg { get; set; } = YesNoEnum.N;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认注册方案Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "默认注册方案")]
|
||||||
|
public virtual long? RegWayId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图标
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "图标", Length = 256), MaxLength(256)]
|
||||||
|
public virtual string? Logo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 标题
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "标题", Length = 32), MaxLength(32)]
|
||||||
|
public virtual string? Title { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 副标题
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "副标题", Length = 32), MaxLength(32)]
|
||||||
|
public virtual string? ViceTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 副描述
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "副描述", Length = 64), MaxLength(64)]
|
||||||
|
public virtual string? ViceDesc { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 水印
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "水印", Length = 32), MaxLength(32)]
|
||||||
|
public virtual string? Watermark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 版权信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "版权信息", Length = 64), MaxLength(64)]
|
||||||
|
public virtual string? Copyright { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ICP备案号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "ICP备案号", Length = 32), MaxLength(32)]
|
||||||
|
public virtual string? Icp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ICP地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "ICP地址", Length = 32), MaxLength(32)]
|
||||||
|
public virtual string? IcpUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public virtual int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public virtual string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public virtual StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统租户配置参数表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统租户配置参数表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysTenantConfig : SysConfig
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 无效字段,用于忽略实体类的Value字段
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
private new string? Value { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统租户配置参数值表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统租户配置参数值表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_TC", nameof(TenantId), OrderByType.Asc, nameof(ConfigId), OrderByType.Asc)]
|
||||||
|
public class SysTenantConfigData : EntityBaseTenantId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 配置项Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "配置项Id")]
|
||||||
|
public long ConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 参数值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "参数值", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? Value { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统租户菜单表
|
||||||
|
/// </summary>
|
||||||
|
[SysTable]
|
||||||
|
[SugarTable(null, "系统租户菜单表")]
|
||||||
|
public class SysTenantMenu : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "租户Id")]
|
||||||
|
public long TenantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "菜单Id")]
|
||||||
|
public long MenuId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,353 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统用户表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_A", nameof(Account), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_P", nameof(Phone), OrderByType.Asc)]
|
||||||
|
public partial class SysUser : EntityBaseTenantOrg
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 账号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "账号", Length = 32)]
|
||||||
|
[Required, MaxLength(32)]
|
||||||
|
public virtual string Account { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "密码", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
public virtual string Password { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 真实姓名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "真实姓名", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public virtual string RealName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 昵称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "昵称", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? NickName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 头像
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "头像", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? Avatar { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 性别-男_1、女_2
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "性别")]
|
||||||
|
public GenderEnum Sex { get; set; } = GenderEnum.Male;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 年龄
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "年龄")]
|
||||||
|
public int Age { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 出生日期
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "出生日期")]
|
||||||
|
public DateTime? Birthday { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 民族
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "民族", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? Nation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 手机号码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "手机号码", Length = 16)]
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? Phone { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 证件类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "证件类型")]
|
||||||
|
public CardTypeEnum CardType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 身份证号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "身份证号", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? IdCardNum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮箱
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "邮箱", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Email { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "地址", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? Address { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文化程度
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "文化程度")]
|
||||||
|
public CultureLevelEnum CultureLevel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 政治面貌
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "政治面貌", Length = 16)]
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? PoliticalOutlook { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 毕业院校
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "毕业院校", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? College { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 办公电话
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "办公电话", Length = 16)]
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? OfficePhone { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 紧急联系人
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "紧急联系人", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? EmergencyContact { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 紧急联系人电话
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "紧急联系人电话", Length = 16)]
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? EmergencyPhone { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 紧急联系人地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "紧急联系人地址", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? EmergencyAddress { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 个人简介
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "个人简介", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? Introduction { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "状态")]
|
||||||
|
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "账号类型")]
|
||||||
|
public AccountTypeEnum AccountType { get; set; } = AccountTypeEnum.NormalUser;
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 直属机构Id
|
||||||
|
///// </summary>
|
||||||
|
//[SugarColumn(ColumnDescription = "直属机构Id")]
|
||||||
|
//public long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 直属机构
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(OrgId))]
|
||||||
|
public SysOrg SysOrg { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 直属主管Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "直属主管Id")]
|
||||||
|
public long? ManagerUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 直属主管
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(ManagerUserId))]
|
||||||
|
public SysUser ManagerUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职位Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职位Id")]
|
||||||
|
public long PosId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职位
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(PosId))]
|
||||||
|
public SysPos SysPos { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "工号", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? JobNum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职级
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职级", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? PosLevel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职称", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? PosTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 擅长领域
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "擅长领域", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? Expertise { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 办公区域
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "办公区域", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? OfficeZone { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 办公室
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "办公室", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? Office { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 入职日期
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "入职日期")]
|
||||||
|
public DateTime? JoinDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最新登录Ip
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最新登录Ip", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? LastLoginIp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最新登录地点
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最新登录地点", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? LastLoginAddress { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最新登录时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最新登录时间")]
|
||||||
|
public DateTime? LastLoginTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最新登录设备
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最新登录设备", Length = 128)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string? LastLoginDevice { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 电子签名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "电子签名", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? Signature { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 语言代码(如 zh-CN)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "语言代码")]
|
||||||
|
public string LangCode { get; set; } = App.GetOptions<LocalizationSettingsOptions>().DefaultCulture;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 个性化首页地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "个性化首页地址", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? Homepage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 验证超级管理员类型,若账号类型为超级管理员则报错
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="errorMsg">自定义错误消息</param>
|
||||||
|
public void ValidateIsSuperAdminAccountType(ErrorCodeEnum? errorMsg = ErrorCodeEnum.D1014)
|
||||||
|
{
|
||||||
|
if (AccountType == AccountTypeEnum.SuperAdmin)
|
||||||
|
{
|
||||||
|
throw Oops.Oh(errorMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 验证用户Id是否相同,若用户Id相同则报错
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userId">用户Id</param>
|
||||||
|
/// <param name="errorMsg">自定义错误消息</param>
|
||||||
|
public void ValidateIsUserId(long userId, ErrorCodeEnum? errorMsg = ErrorCodeEnum.D1001)
|
||||||
|
{
|
||||||
|
if (Id == userId)
|
||||||
|
{
|
||||||
|
throw Oops.Oh(errorMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户配置参数表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统用户配置参数表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysUserConfig : SysConfig
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 无效字段,用于忽略实体类的Value字段
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
private new string? Value { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统租户配置参数值表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统租户配置参数值表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_UC", nameof(UserId), OrderByType.Asc, nameof(ConfigId), OrderByType.Asc)]
|
||||||
|
public class SysUserConfigData : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 配置项Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "配置项Id")]
|
||||||
|
public long ConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 参数值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "参数值", Length = 512)]
|
||||||
|
[MaxLength(512)]
|
||||||
|
public string? Value { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户扩展机构表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统用户扩展机构表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysUserExtOrg : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(UserId))]
|
||||||
|
public SysUser SysUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "机构Id")]
|
||||||
|
public long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机构
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(OrgId))]
|
||||||
|
public SysOrg SysOrg { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职位Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职位Id")]
|
||||||
|
public long PosId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职位
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(PosId))]
|
||||||
|
public SysPos SysPos { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "工号", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? JobNum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职级
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职级", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public string? PosLevel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 入职日期
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "入职日期")]
|
||||||
|
public DateTime? JoinDate { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户域配置表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统用户域配置表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_A", nameof(Account), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_U", nameof(UserId), OrderByType.Asc)]
|
||||||
|
public class SysUserLdap : EntityBaseTenantId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 域账号
|
||||||
|
/// AD域对应sAMAccountName
|
||||||
|
/// Ldap对应uid
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "域账号", Length = 32)]
|
||||||
|
[Required]
|
||||||
|
public string Account { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 域用户名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "域用户名", Length = 32)]
|
||||||
|
public string UserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 对应EmployeeId(用于数据导入对照)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "对应EmployeeId", Length = 32)]
|
||||||
|
public string? EmployeeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组织代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "组织代码", Length = 64)]
|
||||||
|
public string? DeptCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最后设置密码时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "最后设置密码时间")]
|
||||||
|
public DateTime? PwdLastSetTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮箱
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "组织代码", Length = 64)]
|
||||||
|
public string? Mail { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检查账户是否已过期
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "检查账户是否已过期")]
|
||||||
|
public bool AccountExpiresFlag { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码设置是否永不过期
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "密码设置是否永不过期")]
|
||||||
|
public bool DontExpiresFlag { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DN
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "DN", Length = 512)]
|
||||||
|
public string Dn { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户菜单快捷导航表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统用户菜单快捷导航表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysUserMenu : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(UserId))]
|
||||||
|
public SysUser SysUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "菜单Id")]
|
||||||
|
public long MenuId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(MenuId))]
|
||||||
|
public SysMenu SysMenu { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户注册方案表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统用户注册方案表")]
|
||||||
|
[SysTable]
|
||||||
|
public partial class SysUserRegWay : EntityBaseTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 方案名称
|
||||||
|
/// </summary>
|
||||||
|
[MaxLength(32)]
|
||||||
|
[SugarColumn(ColumnDescription = "方案名称", Length = 32)]
|
||||||
|
public virtual string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "账号类型")]
|
||||||
|
public virtual AccountTypeEnum AccountType { get; set; } = AccountTypeEnum.NormalUser;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 注册用户默认角色
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "角色")]
|
||||||
|
public virtual long RoleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 注册用户默认机构
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "机构")]
|
||||||
|
public virtual long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 注册用户默认职位
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职位")]
|
||||||
|
public virtual long PosId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "排序")]
|
||||||
|
public int OrderNo { get; set; } = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[MaxLength(128)]
|
||||||
|
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户角色表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统用户角色表")]
|
||||||
|
[SysTable]
|
||||||
|
public class SysUserRole : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(UserId))]
|
||||||
|
public SysUser SysUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "角色Id")]
|
||||||
|
public long RoleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(RoleId))]
|
||||||
|
public SysRole SysRole { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统微信支付表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统微信支付表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_BU", nameof(BusinessId), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_TR", nameof(TradeState), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_TA", nameof(Tags), OrderByType.Asc)]
|
||||||
|
public partial class SysWechatPay : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 微信商户号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "微信商户号")]
|
||||||
|
[Required]
|
||||||
|
public virtual string MerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 服务商AppId
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "服务商AppId")]
|
||||||
|
[Required]
|
||||||
|
public virtual string AppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 商户订单号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "商户订单号")]
|
||||||
|
[Required]
|
||||||
|
public virtual string OutTradeNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付订单号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "支付订单号")]
|
||||||
|
[Required]
|
||||||
|
public virtual string TransactionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易类型")]
|
||||||
|
public string? TradeType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易状态")]
|
||||||
|
public string? TradeState { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易状态描述
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易状态描述")]
|
||||||
|
public string? TradeStateDescription { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 付款银行类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "付款银行类型")]
|
||||||
|
public string? BankType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 订单总金额
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "订单总金额")]
|
||||||
|
public int Total { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户支付金额
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "用户支付金额")]
|
||||||
|
public int? PayerTotal { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付完成时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "支付完成时间")]
|
||||||
|
public DateTime? SuccessTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易结束时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易结束时间")]
|
||||||
|
public DateTime? ExpireTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 商品描述
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "商品描述")]
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 场景信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "场景信息")]
|
||||||
|
public string? Scene { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 附加数据
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "附加数据")]
|
||||||
|
public string? Attachment { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 优惠标记
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "优惠标记")]
|
||||||
|
public string? GoodsTag { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结算信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "结算信息")]
|
||||||
|
public string? Settlement { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 回调通知地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "回调通知地址")]
|
||||||
|
public string? NotifyUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注")]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 微信OpenId标识
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "微信OpenId标识")]
|
||||||
|
public string? OpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 业务标签,用来区分做什么业务
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Tags标识用来区分这个支付记录对应什么业务从而确定相关联的表名,
|
||||||
|
/// 再结合BusinessId保存了对应的业务数据的ID,就可以确定这个支付
|
||||||
|
/// 记录与哪一条业务数据相关联
|
||||||
|
/// </remarks>
|
||||||
|
[SugarColumn(ColumnDescription = "业务标签,用来区分做什么业务", Length = 64)]
|
||||||
|
public string? Tags { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 对应业务的主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "对应业务的主键")]
|
||||||
|
public long BusinessId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 付款二维码内容
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "付款二维码内容")]
|
||||||
|
public string? QrcodeContent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关联微信用户
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(OpenId))]
|
||||||
|
public SysWechatUser SysWechatUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子商户号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "子商户号")]
|
||||||
|
public string? SubMerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子商户AppId
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "回调通知地址")]
|
||||||
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子商户唯一标识
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "子商户唯一标识")]
|
||||||
|
public string? SubOpenId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统微信支付退款表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统微信支付退款表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_W", nameof(WechatPayId), OrderByType.Asc)]
|
||||||
|
public partial class SysWechatRefund : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 定单主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "定单主键")]
|
||||||
|
public long WechatPayId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 商户退款号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "商户退款号")]
|
||||||
|
[Required]
|
||||||
|
public virtual string OutRefundNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 退款订单号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "退款订单号")]
|
||||||
|
[Required]
|
||||||
|
public virtual string TransactionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 退款原因
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "退款原因")]
|
||||||
|
public string? Reason { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 退款渠道
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "退款渠道")]
|
||||||
|
public string? Channel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 退款入账账户
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 取当前退款单的退款入账方,有以下几种情况:
|
||||||
|
/// 1)退回银行卡:{银行名称}{卡类型}{ 卡尾号}
|
||||||
|
/// 2)退回支付用户零钱: 支付用户零钱
|
||||||
|
/// 3)退还商户: 商户基本账户商户结算银行账户
|
||||||
|
/// 4)退回支付用户零钱通: 支付用户零钱通
|
||||||
|
/// </remarks>
|
||||||
|
[SugarColumn(ColumnDescription = "退款入账账户")]
|
||||||
|
public string? UserReceivedAccount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 退款状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "退款状态")]
|
||||||
|
public string? TradeState { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 交易状态描述
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "交易状态描述")]
|
||||||
|
public string? TradeStateDescription { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 订单总金额
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "退款金额")]
|
||||||
|
public int Refund { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支完成时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "完成时间")]
|
||||||
|
public DateTime? SuccessTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 回调通知地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "回调通知地址")]
|
||||||
|
public string? NotifyUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "备注")]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统微信用户表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "系统微信用户表")]
|
||||||
|
[SysTable]
|
||||||
|
[SugarIndex("index_{table}_N", nameof(NickName), OrderByType.Asc)]
|
||||||
|
[SugarIndex("index_{table}_M", nameof(Mobile), OrderByType.Asc)]
|
||||||
|
public partial class SysWechatUser : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "系统用户Id")]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统用户
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(UserId))]
|
||||||
|
public SysUser SysUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 平台类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "平台类型")]
|
||||||
|
public PlatformTypeEnum PlatformType { get; set; } = PlatformTypeEnum.微信公众号;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OpenId
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "OpenId", Length = 64)]
|
||||||
|
[Required, MaxLength(64)]
|
||||||
|
public virtual string OpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 会话密钥
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "会话密钥", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? SessionKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// UnionId
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "UnionId", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? UnionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 昵称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "昵称", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? NickName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 头像
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "头像", Length = 256)]
|
||||||
|
[MaxLength(256)]
|
||||||
|
public string? Avatar { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 手机号码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "手机号码", Length = 16)]
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? Mobile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 性别
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "性别")]
|
||||||
|
public int? Sex { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 语言
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "语言", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Language { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 城市
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "城市", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? City { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 省
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "省", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Province { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 国家
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "国家", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Country { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AccessToken
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "AccessToken", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? AccessToken { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// RefreshToken
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "RefreshToken", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? RefreshToken { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 过期时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "ExpiresIn")]
|
||||||
|
public int? ExpiresIn { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户授权的作用域,使用逗号分隔
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "授权作用域", Length = 64)]
|
||||||
|
[MaxLength(64)]
|
||||||
|
public string? Scope { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号类型枚举
|
||||||
|
/// </summary>
|
||||||
|
[Description("账号类型枚举")]
|
||||||
|
public enum AccountTypeEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 超级管理员
|
||||||
|
/// </summary>
|
||||||
|
[Description("超级管理员")]
|
||||||
|
SuperAdmin = 999,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统管理员
|
||||||
|
/// </summary>
|
||||||
|
[Description("系统管理员")]
|
||||||
|
SysAdmin = 888,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 普通账号
|
||||||
|
/// </summary>
|
||||||
|
[Description("普通账号")]
|
||||||
|
NormalUser = 777,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 会员
|
||||||
|
/// </summary>
|
||||||
|
[Description("会员")]
|
||||||
|
Member = 666,
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 参与方的证件类型枚举
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[Description("参与方的证件类型枚举")]
|
||||||
|
public enum AlipayCertTypeEnum
|
||||||
|
{
|
||||||
|
[Description("身份证")]
|
||||||
|
IDENTITY_CARD,
|
||||||
|
|
||||||
|
[Description("护照")]
|
||||||
|
PASSPORT
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 参与方的标识类型枚举
|
||||||
|
/// </summary>
|
||||||
|
[SuppressSniffer]
|
||||||
|
[Description("参与方的标识类型枚举")]
|
||||||
|
public enum AlipayIdentityTypeEnum
|
||||||
|
{
|
||||||
|
[Description("支付宝用户UID")]
|
||||||
|
ALIPAY_USER_ID,
|
||||||
|
|
||||||
|
[Description("支付宝登录号")]
|
||||||
|
ALIPAY_LOGON_ID
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 缓存类型枚举
|
||||||
|
/// </summary>
|
||||||
|
[Description("缓存类型枚举")]
|
||||||
|
public enum CacheTypeEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 内存缓存
|
||||||
|
/// </summary>
|
||||||
|
[Description("内存缓存")]
|
||||||
|
Memory,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Redis缓存
|
||||||
|
/// </summary>
|
||||||
|
[Description("Redis缓存")]
|
||||||
|
Redis
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 证件类型枚举
|
||||||
|
/// </summary>
|
||||||
|
[Description("证件类型枚举")]
|
||||||
|
public enum CardTypeEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 身份证
|
||||||
|
/// </summary>
|
||||||
|
[Description("身份证")]
|
||||||
|
IdCard = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 护照
|
||||||
|
/// </summary>
|
||||||
|
[Description("护照")]
|
||||||
|
PassportCard = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 出生证
|
||||||
|
/// </summary>
|
||||||
|
[Description("出生证")]
|
||||||
|
BirthCard = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 港澳台通行证
|
||||||
|
/// </summary>
|
||||||
|
[Description("港澳台通行证")]
|
||||||
|
GatCard = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 外国人居留证
|
||||||
|
/// </summary>
|
||||||
|
[Description("外国人居留证")]
|
||||||
|
ForeignCard = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 营业执照
|
||||||
|
/// </summary>
|
||||||
|
[Description("营业执照")]
|
||||||
|
License = 5,
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码加密枚举
|
||||||
|
/// </summary>
|
||||||
|
[Description("密码加密枚举")]
|
||||||
|
public enum CryptogramEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MD5
|
||||||
|
/// </summary>
|
||||||
|
[Description("MD5")]
|
||||||
|
MD5 = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SM2(国密)
|
||||||
|
/// </summary>
|
||||||
|
[Description("SM2")]
|
||||||
|
SM2 = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SM4(国密)
|
||||||
|
/// </summary>
|
||||||
|
[Description("SM4")]
|
||||||
|
SM4 = 2
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user