mi-assessment/server/MiAssessment/src/MiAssessment.Admin.Business/Models/Content/CreatePromotionRequest.cs
2026-03-19 08:27:06 +08:00

48 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel.DataAnnotations;
namespace MiAssessment.Admin.Business.Models.Content;
/// <summary>
/// 创建宣传图请求
/// </summary>
public class CreatePromotionRequest
{
/// <summary>
/// 标题
/// </summary>
public string? Title { get; set; }
/// <summary>
/// 图片URL必填
/// </summary>
[Required(ErrorMessage = "图片URL不能为空")]
public string ImageUrl { get; set; } = null!;
/// <summary>
/// 图标URL未选中状态
/// </summary>
public string? IconUrl { get; set; }
/// <summary>
/// 图标URL选中状态
/// </summary>
public string? ActiveIconUrl { get; set; }
/// <summary>
/// 位置1首页底部 2团队页必填
/// </summary>
[Required(ErrorMessage = "位置不能为空")]
[Range(1, 2, ErrorMessage = "位置值必须为1或2")]
public int Position { get; set; }
/// <summary>
/// 排序
/// </summary>
public int Sort { get; set; }
/// <summary>
/// 状态0禁用 1启用默认启用
/// </summary>
public int Status { get; set; } = 1;
}