using Lada.Framework.Data.Domains.BaseEntities;
using Lada.Framework.Data.Enums;
using System.ComponentModel.DataAnnotations;

namespace Lada.Framework.Data.Domains.Cms
{
    public class Category : BaseEntityWithKey<int>
    {
        [MaxLength(128)]
        public string Name { get; set; }

        [MaxLength(512)]
        public string Description { get; set; }

        public uint DisplayOrder { get; set; }

        /// <summary>
        /// Danh mục cha
        /// </summary>
        public int ParentId { get; set; } = 0;

        /// <summary>
        /// Loại danh mục
        /// </summary>
        public ContentType ContentType { get; set; }

        /// <summary>
        /// Là danh mục nổi bật hay không?
        /// </summary>
        public bool IsFeatured { get; set; }

        public UrlRecord? UrlRecord { get; set; }

        public virtual IEnumerable<PostCategory>? PostCategories { get; set; }
        public virtual IEnumerable<ProductCategory>? ProductCategories { get; set; }

    }
}
