using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XYY.Common.Standard.Attributes;
using XYY.Core.Standard;

namespace XYY.Model.Standard.DingTalk
{
    public class DingTalk_Payment : BaseEntity
    {
        public DingTalk_Payment()
        {
            details = new List<DingTalk_PaymentDetail>();
        }
        public string ProcessCode { get; set; }
        public string originator_dept_id { get; set; }
        public string originator_dept_name { get; set; }
        public string originator_userid { get; set; }
        public int wms_userid { get; set; }
        public string wms_userName { get; set; }
        public string title { get; set; }
        public string business_id { get; set; }
        public ObjectApplyEnum Status { get; set; }
        public decimal PaymentAmount { get; set; }
        public DateTime? finish_time { get; set; }
        public DateTime startTime { get; set; }

        public string PaymentFlow { get; set; }
        public string PaymentCurrency { get; set; }
        public string PaymentMethod { get; set; }
        public decimal PaymentTotal { get; set; }
        public string PaymentTotalUpper { get; set; }
        public DateTime PaymentTime { get; set; }
        public string PaymentObject { get; set; }
        public string DepositBank { get; set; }
        public string BankAccount { get; set; }

        public string ImageUrl { get; set; }
        public string InvoiceUrl { get; set; }



        [NoDb]
        public List<DingTalk_PaymentDetail> details { get; set; }
        [NoDb]
        public string StatusDec { get { return Status.GetDescription(); } }
        [NoDb]
        public List<string> ImageUrlArrry
        {
            get
            {
                if (!string.IsNullOrEmpty(ImageUrl))
                {
                    return ImageUrl.Split(',').ToList();
                }
                else { 
                    return new  List<string>();
                }
            }
        }
        [NoDb]
        public List<string> InvoiceUrlArrry
        {
            get
            {
                if (!string.IsNullOrEmpty(InvoiceUrl))
                {
                    return InvoiceUrl.Split(',').ToList();
                }
                else
                {
                    return new List<string>();
                }
            }
        }
    }
}
