using SqlSugar;
namespace MyHomePage.Api.Models.Entities;
/// 用户设置(单行记录,Id 固定为 1)
[SugarTable("settings")]
public class Setting : BaseEntity
{
/// 主题模式:dark | light | auto
[SugarColumn(Length = 16, IsNullable = false, DefaultValue = "dark")]
public string ThemeMode { get; set; } = "dark";
/// 主色调(HEX 字符串)
[SugarColumn(Length = 16, IsNullable = false, DefaultValue = "#6c5ce7")]
public string AccentColor { get; set; } = "#6c5ce7";
/// 背景图:预设 key(wp1..wp6)或自定义 URL
[SugarColumn(Length = 512, IsNullable = true, DefaultValue = "wp1")]
public string? BackgroundImage { get; set; }
/// 背景类型:preset | custom | solid
[SugarColumn(Length = 16, IsNullable = false, DefaultValue = "preset")]
public string BackgroundType { get; set; } = "preset";
/// 链接打开方式:1 = 新选项卡(默认);0 = 当前选项卡。底层用 int 存储以兼容 SqlSugar + SQLite。
[SugarColumn(IsNullable = false, DefaultValue = "1")]
public int OpenLinksInNewTab { get; set; } = 1;
/// 搜索框行为:1 = 搜索结果在新选项卡打开(默认);0 = 当前选项卡打开(P46)。
[SugarColumn(IsNullable = false, DefaultValue = "1")]
public int OpenSearchInNewTab { get; set; } = 1;
/// 是否启用 360 在线壁纸模式(P34):0 = 关闭(默认,使用预设/自定义背景),1 = 开启(按分类随机 + 定时切换)
[SugarColumn(IsNullable = false, DefaultValue = "0")]
public int WallpaperEnabled { get; set; } = 0;
/// 360 壁纸分类 ID(P34),例如 "36"。空字符串表示「全部/推荐」。
[SugarColumn(Length = 32, IsNullable = true, DefaultValue = "")]
public string? WallpaperCategoryId { get; set; } = "";
/// 壁纸自动切换间隔(分钟,P34)。默认 30。0 表示不自动切换,仅手动触发立即切换按钮。
[SugarColumn(IsNullable = false, DefaultValue = "30")]
public int WallpaperInterval { get; set; } = 30;
}