using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace Atomx.Admin.Client.Models
{
    public class AppVersionModel
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 运行平台
        /// </summary>
        public int Platform { get; set; }

        /// <summary>
        /// 应用名称KEY
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string AppName { get; set; } = string.Empty;

        /// <summary>
        /// 版本标题
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 版本
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Version { get; set; } = string.Empty;

        /// <summary>
        /// 主版本号(major)无法向下兼容时，需要递增
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public int VersionX { get; set; }

        /// <summary>
        /// 次版本号(minor)新增新的特性时，需要递增
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public int VersionY { get; set; }

        /// <summary>
        /// 修订版本号(patch)修复问题时，需要递增
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public int VersionZ { get; set; }

        /// <summary>
        /// 版本日期
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public int VersionDate { get; set; }

        /// <summary>
        /// 版本状态 例如：b 表示bate版，即测试版
        /// </summary>
        public int VersionState { get; set; }

        /// <summary>
        /// 更新内容说明
        /// </summary>
        [Column(TypeName = "text")]
        public string Content { get; set; } = string.Empty;

        /// <summary>
        /// 版本状态
        /// </summary>
        public int Status { get; set; }
    }
}
