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

namespace Bp.Sync.Domain.Entities.FcBusinesses.Bills
{
    public class ReceiptBill : BaseEntityByLong
    {
        [MaxLength(256)]
        public string Code { get; set; }

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

        public BillStatus BillStatus { get; set; }
        public BillType BillType { get; set; }
        public int CustomerId { get; set; }
        public int ExpertId { get; set; }
        public int BranchId { get; set; }
        public decimal CustomerPay { get; set; }
        public decimal CustomerChange { get; set; }
        public decimal TotalReceiptPayPoint { get; set; }
        public decimal TotalReceiptEarnedPoint { get; set; }
        public decimal TotalReceiptDiscount { get; set; }
        public decimal TotalReceiptPrice { get; set; }
        public decimal Quantity { get; set; }

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

        public int CompletedBy { get; set; }

        [MaxLength(155)]
        public string CompletedByUserName { get; set; }

        public DateTimeOffset? CompletedDate { get; set; }

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

        public DateTimeOffset? InvoiceDate { get; set; }

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

        public long? RelateBillId { get; set; }
        public int NumberOfEdit { get; set; }
        public PaymentMode? PaymentMode { get; set; }
        public SyncDavStatus SyncDavStatus { get; set; }
    }

    public enum PaymentMode
    {
        [Description("Tiền mặt")]
        UsingCase = 1,

        [Description("Chuyển khoản")]
        BankTransfer = 2,
    }
}