新增数据信息 完善数据信息得权限问题
This commit is contained in:
2025-05-21 21:28:18 +08:00
parent 647f2b75c9
commit aaebbb9104
14 changed files with 640 additions and 13 deletions
+10 -1
View File
@@ -7,6 +7,7 @@ namespace LMS.Repository.DB;
public class Options
{
[Key]
[Required]
public required string Key { get; set; } = string.Empty;
/// <summary>
@@ -14,9 +15,17 @@ public class Options
/// </summary>
public string? Value { get; set; } = string.Empty;
[Required]
public OptionTypeEnum Type { get; set; } = OptionTypeEnum.String;
// 写一个字段,映射Value,判断是不是json字符串,是的话就解析成对象
[Required]
public OptionCategory Category { get; set; } = OptionCategory.System;
[Required]
public List<long> RoleIds { get; set; } = [];
public DateTime CreatedTime { get; set; }
// 写一个字段,映射Value,判断是不是json字符串,是的话就解析成对象
public T? GetValueObject<T>()
{