2026-02-26 18:29:08 +08:00

119 lines
3.0 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 SqlSugar;
using System.ComponentModel.DataAnnotations;
using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
/// <summary>
/// 轮播图配置
/// </summary>
[SugarTable("Banner")]
public class Banner : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability, ISortable
{
/// <summary>
/// 标题
/// </summary>
[SugarColumn(ColumnDescription = "标题", Length = 128, IsNullable = true)]
public string Title { get; set; }
/// <summary>
/// 图片地址
/// </summary>
[SugarColumn(ColumnDescription = "图片地址", Length = 512)]
[Required, MaxLength(512)]
public string ImageUrl { get; set; }
/// <summary>
/// 跳转链接类型(0-图片/无跳转 1-赛事)
/// </summary>
[SugarColumn(ColumnDescription = "跳转链接类型")]
public int LinkType { get; set; }
/// <summary>
/// 跳转目标(赛事ID或URL)
/// </summary>
[SugarColumn(ColumnDescription = "跳转目标", Length = 512, IsNullable = true)]
public string LinkTarget { get; set; }
/// <summary>
/// 排序
/// </summary>
[SugarColumn(ColumnDescription = "排序")]
public int Sort { get; set; }
/// <summary>
/// 状态(0-启用 1-禁用)
/// </summary>
[SugarColumn(ColumnDescription = "状态")]
public AvailabilityStatus Status { get; set; }
/// <summary>
/// 备注
/// </summary>
[SugarColumn(ColumnDescription = "备注", Length = 256, IsNullable = true)]
public string Remark { get; set; }
/// <summary>
/// 标记删除
/// </summary>
public bool DeleteMark { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreatedUserId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedTime { get; set; }
/// <summary>
/// 更新人
/// </summary>
public long? UpdatedUserId { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime? UpdatedTime { get; set; }
}
/// <summary>
/// 轮播图设置(存储手动/自动模式)
/// </summary>
[SugarTable("BannerConfig")]
public class BannerConfig : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime
{
/// <summary>
/// 模式(0-手动配置 1-自动配置)
/// </summary>
[SugarColumn(ColumnDescription = "模式(0-手动配置 1-自动配置)")]
public int Mode { get; set; }
/// <summary>
/// 标记删除
/// </summary>
public bool DeleteMark { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreatedUserId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedTime { get; set; }
/// <summary>
/// 更新人
/// </summary>
public long? UpdatedUserId { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime? UpdatedTime { get; set; }
}