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

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

        /// <summary>
        /// 分类类型,1内容，2产品，3社区
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 上级分类ID
        /// </summary>
        public long ParentId { get; set; }

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

        /// <summary>
        /// 分类URL缩略名
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public string Slug { get; set; } = string.Empty;

        /// <summary>
        /// Meta描述介绍
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string MetaDescription { get; set; } = string.Empty;

        /// <summary>
        /// Meta关键词
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string MetaKeywords { get; set; } = string.Empty;

        /// <summary>
        /// 过滤属性IDs
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string FilterAttributes { get; set; } = string.Empty;

        /// <summary>
        /// 分类图片
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string Image { get; set; } = string.Empty;

        /// <summary>
        /// 分类页 banner
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string Banner { get; set; } = string.Empty;

        /// <summary>
        /// 只是一个节点
        /// </summary>
        public bool IsNode { get; set; }

        /// <summary>
        /// 是否可用
        /// </summary>

        public bool Enabled { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int DisplayOrder { get; set; }
    }
}
