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

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 店铺
    /// </summary>
    [Table("Stores")]
    public class Store
    {
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }
        /// <summary>
        /// 归属公司ID
        /// </summary>
        public long CorporationId { get; set; }

        /// <summary>
        /// 上级ID，用于团队内部分组
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 店铺类型，网店，实体店，档口，直播间
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public required string Name { get; set; }

        /// <summary>
        /// 数据状态
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 数据创建时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime CreateTime { get; set; } = DateTime.UtcNow;

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

        /// <summary>
        /// 数据删除时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime? DeleteTime { get; set; }
    }
}
