using MTWorkHR.Core.Entities.Base;
using MTWorkHR.Core.Global;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTWorkHR.Core.Entities
{
    public class Contract : FullAuditEntity, IHaveCompany
    {
        public int ContractTypeId { get; set; }
        public int ContractStatusId { get; set; }

        public long CompanyId { get; set; }
        public string CompanyRepresentativeId { get; set; }
       
        public string UserId { get; set; }
      
        public int? JobId { get; set; }
        public int? AcademicQualificationId { get; set; }
        public int? SpecializationId { get; set; }
        public int? WorkCountryId { get; set; }
        public int? WorkStateId { get; set; }
        public int? ContractorTaxResidencyId { 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; }
        public DateTime? EndDate { get; set; }
        public int? ContractDurationId { get; set; } //:  اختيار: شهري – ربعي – نصف سنوي – 3 ارباع – سنوي
        public TypeOfWork TypeOfWork { get; set; } //: :   اختيار: عقد بدوام كامل -  عقد دوام جزئي   
        public int? VacationDays { get; set; } //اختيار: بدون – سنويا (رقم)
        public int TrialPeriod { get; set; } // تجربة (ادخال: تلقائياً كل ربع سنوي أسبوع تلقائياً) آخر: تعديل
        public int? WhoCanTerminateContractInTrial { get; set; } //اختيار   الجميع – صاحب العمل – الموظف
        public int? WhoCanTerminateContract { get; set; }
        public int? NoticePeriodBeforeTermination { get; set; } //اختيار: بدون – تحديد (ادخال: تلقائياً مدة 10 أيام قبل انتهاء الاستحقاق) آخر: تعديل


        //------Working time---------------
        public string? WorkingDays { get; set; } //:   اختيار متعدد الأيام سبت أحد اثنين..... (بحيث الأيام الأخرى تكون إجازة) 1,2,3,4,5
        public int? 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


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

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

        //-------------------------------
        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 decimal? GrossAnnualBaseSalary { get; set; }

        //  public bool? AddSigningBonus { get; set; }
        // public bool? AddAnnualVariableCompensation { get; set; }

        //public bool FullTime { get; set; } = true; //full-time that will be 40 hours , part-time will be add it manually
        //public int EmployeeTypeHours { get; set; } = 40; //full-time that will be 40 hours , part-time will be add it manually

        //public int PaidVacationDays { get; set; }
        //public int SickDays { get; set; }
        //public bool EmploymentTerms { get; set; }

    }
}