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

namespace Bp.Sync.Domain.Entities.Inventories.Invoices
{
    public class ProductInvoice : BaseEntityWithKey<long>
    {
        /// <summary>
        /// Mã hóa đơn
        /// </summary>
        public long InvoiceId { get; set; }
        /// <summary>
        /// Id sản phẩm
        /// </summary>
        public long ProductId { get; set; }
        /// <summary>
        /// Id đơn vị tính
        /// </summary>
        public int UnitId { get; set; }
        /// <summary>
        /// Mã lưu kho
        /// </summary>
        public string InventoryCode { get; set; }
        /// <summary>
        /// Số lượng
        /// </summary>
        [Column(TypeName = "decimal(18, 4)")]
        public decimal Quantity { get; set; }
        /// <summary>
        /// Giá bán
        /// </summary>
        [Column(TypeName = "decimal(18, 4)")]
        public decimal Price { get; set; }
        /// <summary>
        /// Chiết khấu 
        /// </summary>
        [Column(TypeName = "decimal(18, 4)")]
        public decimal Discount { get; set; }
        /// <summary>
        /// Thuế VAT
        /// </summary>
        [Column(TypeName = "decimal(18, 4)")]
        public decimal Tax { get; set; }
        public long RelateId { get; set; }
    }
}
