27 lines
613 B
C#
27 lines
613 B
C#
|
|
|
|||
|
|
using LMS.Common.Enums;
|
|||
|
|
using System.ComponentModel.DataAnnotations;
|
|||
|
|
|
|||
|
|
namespace LMS.Repository.Options;
|
|||
|
|
|
|||
|
|
public class AddOptionModel
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
[Required]
|
|||
|
|
public required string Key { get; set; } = string.Empty;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Value of the option,这个值是一个json字符串
|
|||
|
|
/// </summary>
|
|||
|
|
public string? Value { get; set; } = string.Empty;
|
|||
|
|
|
|||
|
|
[Required]
|
|||
|
|
public OptionTypeEnum Type { get; set; } = OptionTypeEnum.String;
|
|||
|
|
|
|||
|
|
[Required]
|
|||
|
|
public OptionCategory Category { get; set; } = OptionCategory.System;
|
|||
|
|
|
|||
|
|
[Required]
|
|||
|
|
public List<string> RoleNames { get; set; }
|
|||
|
|
}
|