using Bp.Sync.Domain.Elastics.BaseEntities;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Bp.Sync.Domain.Elastics.Davs
{
    public class ProductStorageDavElastic : ElasticBaseEntityWithKey<long>
    {
        public long ProductId { get; set; }

        /// <summary>
        /// Tên sản phẩm
        /// </summary>
        [MaxLength(2048)]
        public string ProductName { get; set; }

        /// <summary>
        /// Mã sản phẩm
        /// </summary>
        ///
        [MaxLength(256)]
        public string ProductCode { get; set; }

        /// <summary>
        /// Mã dược quốc gia
        /// </summary>
        ///
        [MaxLength(256)]
        public string ProductCodeDav { get; set; }

        [MaxLength(256)]
        public string InventoryCode { get; set; }

        [MaxLength(256)]
        public string UnitName { get; set; }

        public int UnitId { get; set; }

        /// <summary>
        /// Số lượng tồn
        /// </summary>
        [Column(TypeName = "decimal(18, 4)")]
        public decimal Quantity { get; set; }

        /// <summary>
        /// Giá nhập
        /// </summary>
        [Column(TypeName = "decimal(18, 4)")]
        public decimal CostPrice { get; set; }

        /// <summary>
        /// Giá bán
        /// </summary>
        [Column(TypeName = "decimal(18, 4)")]
        public decimal Price { get; set; }

        /// <summary>
        /// Giá bán sỉ
        /// </summary>
        [Column(TypeName = "decimal(18, 4)")]
        public decimal WholeSalePrice { get; set; }

        /// <summary>
        /// Id chi nhánh
        /// </summary>
        public int BranchId { get; set; }

        /// <summary>
        /// Lô sản xuất
        /// </summary>
        ///
        [MaxLength(256)]
        public string ManufactureBatchNo { get; set; }

        public DateTimeOffset ExpirationDate { get; set; }
        public DateTimeOffset ManufactureDate { get; set; }

        /// <summary>
        /// Phân loại bán buôn - bán lẻ
        /// </summary>
        ///
        public SyncSaleType SyncSaleType { get; set; }

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