using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using CafeTerrace.Models.DataBase;

namespace CafeTerrace.Models.Api
{
    public class OrderProfile
    {
        public string OrderId { get; set; }
        public DateTime Register { get; set; }
        public OrderStatus OrderStatus { get; set; }
        public string DeskNumber { get; set; }
        public IEnumerable<OrderFood> OrderFoods { get; set; }

        public String PersianRegister
        {
            get
            {
                PersianCalendar pc = new PersianCalendar();
                return string.Format("{0}/{1}/{2}", pc.GetYear(Register), pc.GetMonth(Register), pc.GetDayOfMonth(Register));
            }
        }
        public long TotalPrice
        {
            get
            {
                long t = 0;
                if (OrderFoods != null)
                    foreach (var orderFood in OrderFoods)
                    {
                        t += orderFood.CountAmount;
                    }
                return t;
            }
        }

    }

    public enum OrderStatus
    {
        Doing,
        Cancel,
        Done
    }

    public enum OrderType
    {
        Internal,
        Exterior
    }
}
