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

namespace Lada.Framework.Data.Domains.Orders
{
    public class OrderAddress : BaseEntityWithKey<int>
    {


        [MaxLength(255)]
        public string Name { get; set; }

        [MaxLength(128)]
        public string PhoneNumber1 { get; set; }

        [MaxLength(128)]
        public string PhoneNumber2 { get; set; }

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

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

        /// <summary>
        /// Loại địa chỉ
        /// </summary>
        public AddressType AddressType { get; set; }

        public int CityId { get; set; }
        public int DistrictId { get; set; }
        public int WardId { get; set; }

        #region Relation
        public int OrderId { get; set; }
        public virtual Order Order { get; set; }
        #endregion

        [MaxLength(1024)]
        public string Note { get; set; }

        /// <summary>
        /// Thời gian hẹn lấy / giao hàng
        /// </summary>
        public DateTimeOffset? ScheduledTime { get; set; }
    }
}
