using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using SPC.Kiosk.Base;
using SPC.Kiosk.Common;

namespace SPC.Kiosk.Popup.Model
{
    /// <summary>
    /// Mobile Coupon Return Model
    /// </summary>
    public class M_MobileCouponReturn 
    {
        /// <summary>
        /// 쿠폰 번호
        /// </summary>
        public string Number { get; set; } = string.Empty;
        /// <summary>
        /// 쿠폰 명
        /// </summary>
        public string Name { get; set; } = string.Empty;
        /// <summary>
        /// 전체 쿠폰 금액
        /// </summary>
        public long TotalAmount { get; set; } = 0;
        /// <summary>
        /// 동시 사용 제약
        /// </summary>
        public bool IsOnlyAllUse { get; set; } = false;
        /// <summary>
        /// 전체 사용 금액 (할인 확정 금액 합계)
        /// </summary>
        public long TotalUseAmount { get; set; } = 0;
        /// <summary>
        /// 사용 쿠폰 수
        /// </summary>
        public int UsingCounts { get; set; } = 0;
        /// <summary>
        /// 가상 쿠폰 목록
        /// </summary>
        public List<M_MobileCouponDetail> VirtureCoupons { get; set; } = new List<M_MobileCouponDetail>();
    }
    /// <summary>
    /// Mobile Coupon Detail Model
    /// </summary>
    public class M_MobileCouponDetail:ViewModelBase
    {
        /// <summary>
        /// 가상 쿠폰 번호
        /// </summary>
        public string Number { get; set; } = string.Empty;
        /// <summary>
        /// 가상 쿠폰명
        /// </summary>
        public string Name { get; set; } = string.Empty;
        /// <summary>
        /// 브렌드 코드
        /// </summary>
        public string BrandCode { get; set; } = string.Empty;
        /// <summary>
        /// 브렌드 명
        /// </summary>
        public string BrandName { get; set; } = string.Empty;
        /// <summary>
        /// 종류
        /// </summary>
        public MobileCouponType Type { get; set; } = MobileCouponType.NormalValue;
        /// <summary>
        /// 옵션
        /// </summary>
        public MobileCouponOptionType Option { get; set; } = MobileCouponOptionType.None;
        /// <summary>
        /// 권면가
        /// </summary>
        public long ShowPrice { get; set; } =0L;
        /// <summary>
        /// 구매가
        /// </summary>
        public long ByePrice { get; set; } = 0L;
        /// <summary>
        /// 잔액
        /// </summary>
        public long RemainPrice { get; set; } = 0L;
        /// <summary>
        /// 가용 금액
        /// </summary>
        public long CanUsingPrice { get; set; } = 0L;
        /// <summary>
        /// 그룹 번호
        /// </summary>
        public int GroupNo { get; set; } = 0;
        /// <summary>
        /// 그룹 사용 횟수
        /// </summary>
        public int GroupLimitUsingCount { get; set; } = 0;
        /// <summary>
        /// 유효 기간 시작
        /// </summary>
        public DateTime StartDate { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 유효 기간 종료
        /// </summary>
        public DateTime EndDate { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 상태
        /// </summary>
        public MobileCouponStatusType Status { get; set; } = MobileCouponStatusType.CanUse;
        /// <summary>
        /// 상태 설명
        /// </summary>
        public string StatusDetail { get; set; } = string.Empty;
        /// <summary>
        /// 구성 상품 순번 (상품코드) 
        /// </summary>
        public string ItemCodeKey { get; set; } = string.Empty;
        /// <summary>
        /// 상품 코드
        /// </summary>
        public List<string> ItemCodes { get; set; } = new List<string>();
        private long requestPrice = 0L;
        /// <summary>
        /// 사용 요청 금액
        /// </summary>
        public long RequestPrice
        {
            get { return requestPrice; }
            set { requestPrice = value; PropertyChange("RequestPrice"); }
        }
        private long discountPrice = 0L;
        /// <summary>
        /// 할인 확정 금액
        /// </summary>
        public long DiscountPrice
        {
            get { return discountPrice; }
            set { discountPrice = value; PropertyChange("DiscountPrice"); }
        }
        private string statusText = string.Empty;
        /// <summary>
        /// 상태 문자열
        /// </summary>
        public string StatusText
        {
            get { return statusText; }
            set { statusText = value; PropertyChange("StatusText"); }

        }
        /// <summary>
        /// 승인 순번
        /// </summary>
        public long PaySEQ { get; set; } = -1L;

    }
}