using Lada.Framework.DTO;
using Ladaer.BackEnd.Infrastructures.DTO.Items.Medias;
using Ladaer.BackEnd.Infrastructures.DTO.Items.Orders;

namespace Ladaer.BackEnd.Infrastructures.DTO.Models.Orders.Detail
{
    /// <summary>
    /// Model chi tiết đơn hàng với thông tin đơn vị đo
    /// </summary>
    public class OrderDetailWithUnitsModel : BaseModel<int>
    {
        public OrderDetailWithUnitsModel()
        {
            General = new OrderDetailGeneralModel
            {
                Code = string.Empty,
                StatusContent = string.Empty,
                RouteName = string.Empty,
                CustomerName = string.Empty,
                CustomerUserName = string.Empty,
                PicUserName = string.Empty
            };
            Addresses = new List<OrderDetailAddressModel>();
            Packages = new List<OrderPackageResponseItem>();
            Tracks = new List<OrderDetailTrackModel>();
            Finance = new OrderDetailFinModel();
            MediaItems = new List<MediaItem>();
            UnitInfo = new UnitInformation();
        }

        public OrderDetailGeneralModel General { get; set; }
        public required OrderDetailFinModel Finance { get; set; }

        public List<OrderDetailAddressModel> Addresses { get; set; }
        
        /// <summary>
        /// Packages với thông tin đơn vị đo
        /// </summary>
        public List<OrderPackageResponseItem> Packages { get; set; }

        public List<OrderDetailTrackModel> Tracks { get; set; }

        public required List<MediaItem> MediaItems { get; set; }

        /// <summary>
        /// Thông tin về đơn vị đo
        /// </summary>
        public UnitInformation UnitInfo { get; set; }


        public bool Editable { get; set; } = false;
    }
}
