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