using MTWorkHR.Core.Entities.Base;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using MTWorkHR.Core.Entities;
using MTWorkHR.Core.Global;
using Newtonsoft.Json;

namespace MTWorkHR.Infrastructure.Entities
{
    public class ContractDetail2
    {
        public ContractTypeEnum ContractTypeId { get; set; }
        public ContractStatusEnum ContractStatusId { get; set; }
        //--------Company data-------
        public string CompanyName { get; set; }
        public string CompanyCR { get; set; }
        public string CompanyEmail { get; set; }
        public string CompanyAddress { get; set; }
        public string CompanyPhone { get; set; }
        //--------Company Representative-------
        public string CompanyRepresentativeName { get; set; }
        public string CompanyRepresentativePassport { get; set; }
        public string CompanyRepresentativePhone { get; set; }
        public string CompanyRepresentativeEmail { get; set; }
        public string CompanyRepresentativePosition { get; set; }
        //--------Employee Data------------------------------------
        public string UserId { get; set; }
        [JsonProperty(Required = Required.AllowNull)]
        public string? EmployeeName { get; set; }
        [JsonProperty(Required = Required.AllowNull)]
        public string? EmployeeEmail { get; set; }
        public string? EmployeePassport{ get; set; }
        public string? EmployeePhone { get; set; }
        public string? EmployeeUniversity { get; set; }
        public DateTime? EmployeeDateOfBirth { get; set; }
        //-----------------------------
        public string? EmployeeJobName { get; set; }
        public string? AcademicQualification { get; set; }
        public string? Specialization { get; set; }
        public string WorkCountry { get; set; }
        public string WorkState { get; set; }
        //-------------------Scope of work-----------
        public string? JobTitleName { get; set; }
        public string? JobDescription { get; set; }
        [MaxLength(150)]
        public string? JobNumber { get; set; } //ثابت و مأخوذ من المنصة
        //----------------Contract data -------------------------
        public DateTime? StartDate { get; set; }
        [JsonProperty(Required = Required.AllowNull)]
        public DateTime? EndDate { get; set; }

        [JsonProperty(Required = Required.AllowNull)]
        public string? ContractDuration { get; set; } //:  اختيار: شهري – ربعي – نصف سنوي – 3 ارباع – سنوي
        public string? TypeOfWork { get; set; } //: :   اختيار: عقد بدوام كامل -  عقد دوام جزئي   
        [JsonProperty(Required = Required.AllowNull)]
        public int? VacationDays { get; set; } //اختيار: بدون – سنويا (رقم)
        public int? TrialPeriod { get; set; } // تجربة (ادخال: تلقائياً كل ربع سنوي أسبوع تلقائياً) آخر: تعديل
        public string? WhoCanTerminateContractInTrial { get; set; } //اختيار   الجميع – صاحب العمل – الموظف
        public string? WhoCanTerminateContract { get; set; }
        [JsonProperty(Required = Required.AllowNull)]
        public int? NoticePeriodBeforeTermination { get; set; } //اختيار: بدون – تحديد (ادخال: تلقائياً مدة 10 أيام قبل انتهاء الاستحقاق) آخر: تعديل


        //------Working time---------------
        [JsonProperty(Required = Required.AllowNull)]
        public List<string>? WorkingDays { get; set; } //:   اختيار متعدد الأيام سبت أحد اثنين..... (بحيث الأيام الأخرى تكون إجازة) 1,2,3,4,5
        public string? WorkingHours { get; set; } //	يومي/ اسبوعي  
        public int? WorkingHoursNum { get; set; } // عدد الساعات
        public DateTime? StartDailyWorkingHours { get; set; } // تحديد ساعات الدوام قائمة الساعات << التوقيت بحسب دولة صاحب العمل
        public DateTime? EndDailyWorkingHours { get; set; } // تحديد ساعات الدوام قائمة الساعات << التوقيت بحسب دولة صاحب العمل

        //----------Salary-----------------
        [MaxLength(50)]
        public string? Currency { get; set; }
        public decimal? Salary { get; set; }
        public string? BillingCycle { get; set; }// 2 fortnightly, 4 Monthly
        //------------------------Fixed Pay----------------
        public DateTime? FirstPatchDateFrom { get; set; }
        public DateTime? FirstPatchDateTo { get; set; } //
        public decimal? FirstPatchAmount { get; set; }

        public DateTime? LastPatchDateFrom { get; set; } //
        public DateTime? LastPatchDateTo { get; set; } // 
        public decimal? LastPatchAmount { get; set; }
        public string? Teams { get; set; }
        public string? Vacations { get; set; }


        //---------Allowances----------------------
        public bool IncludesAllAllowances { get; set; }
        public List<ContractAllowance>? FixedAllowances { get; set; }

        //-------------------------------
        public List<ContractTask>? ContractTasks { get; set; }
        public List<ProjectStage>? ProjectStages { get; set; }
    }
}