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

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 本地化多语言资源，用于系统文本多语言
    /// </summary>
    [Table("LocaleResources")]
    public class LocaleResource
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 语言编码
        /// </summary>
        public int LanguageId { get; set; }

        /// <summary>
        /// 资源名称
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 资源内容值
        /// </summary>
        [Column(TypeName = "varchar(1000)")]
        public string Value { get; set; } = string.Empty;

        /// <summary>
        /// 最后更新时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime? UpdateTime { get; set; }
    }
}
