😎1、增加租户过期字段 2、初始化种子排除租户种子
This commit is contained in:
parent
1b70a70876
commit
ccdd5f7338
@ -7,7 +7,7 @@
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 租户种子数据特性
|
||||
/// 租户种子数据特性(种子Id不要设置值)
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||
|
||||
@ -82,4 +82,10 @@ public partial class SysTenant : EntityBase
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "状态", DefaultValue = "1")]
|
||||
public StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 过期时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "过期时间")]
|
||||
public DateTime? ExpirationTime { get; set; }
|
||||
}
|
||||
@ -336,6 +336,7 @@ public static class SqlSugarSetup
|
||||
|
||||
Log.Information($"初始化种子数据 {config.DbType} - {config.ConfigId}");
|
||||
var seedDataTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.GetInterfaces().Any(i => i.HasImplementedRawGeneric(typeof(ISqlSugarEntitySeedData<>))))
|
||||
.Where(u => !u.IsDefined(typeof(TenantSeedAttribute), false))
|
||||
.WhereIF(config.SeedSettings.EnableIncreSeed, u => u.IsDefined(typeof(IncreSeedAttribute), false))
|
||||
.OrderBy(u => u.GetCustomAttributes(typeof(SeedDataAttribute), false).Length > 0 ? ((SeedDataAttribute)u.GetCustomAttributes(typeof(SeedDataAttribute), false)[0]).Order : 0).ToList();
|
||||
|
||||
|
||||
@ -37,6 +37,11 @@
|
||||
<el-input v-model="state.ruleForm.email" placeholder="邮箱" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="过期时间">
|
||||
<el-date-picker v-model="state.ruleForm.expirationTime" type="datetime" placeholder="过期时间" value-format="YYYY-MM-DD HH:mm:ss" class="w100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="排序">
|
||||
<el-input-number v-model="state.ruleForm.orderNo" placeholder="排序" class="w100" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user