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

namespace Bp.Sync.Domain.Entities.Inventories.Invoices
{
    public class Invoice : BaseEntityWithKey<long>
    {
        /// <summary>
        /// Mã hóa đơn 
        /// </summary>
        [Column(TypeName = "nvarchar(64)")]
        public string Code { get; set; }
        /// <summary>
        /// Mã liên quan 
        /// </summary>
        [Column(TypeName = "nvarchar(64)")]
        public string RelateCode { get; set; }
        /// <summary>
        /// Loại hóa đơn
        /// </summary>
        public InvoiceType InvoiceType { get; set; }
        /// <summary>
        /// Mã chi nhánh hiện tại
        /// </summary>
        public int BranchId { get; set; }
        /// <summary>
        /// Mã khách hàng
        /// </summary>
        public int CustomerId { get; set; }
    }

    public enum InvoiceType
    {
        [Description("Bán lẻ")]
        Retail = 1,
        [Description("Đặt hàng")]
        Order = 2
    }
}
