using System.Data.Entity.ModelConfiguration;

// namespaces...
namespace EntityFirst.Module.BusinessObjects
{
    // public classes...
    public class EmployeeConfiguration : EntityTypeConfiguration<Employee>
    {
        // public constructors...
        public EmployeeConfiguration()
        {
            ToTable("Employees", "dbo");
            HasKey<int>(s => s.empl_id);
            Ignore<Gender>(s => s.Gender);
            Property(p => p.empl_gender)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_c)
                .HasMaxLength(20)
                .IsRequired();
            Property(p => p.empl_surn)
                .HasMaxLength(40)
                .IsRequired();
            Property(p => p.empl_name)
                .HasMaxLength(40);
            Property(p => p.empl_f_surn)
                .HasMaxLength(40);
            Property(p => p.empl_f_name)
                .HasMaxLength(40);
            Property(p => p.empl_m_surn)
                .HasMaxLength(40);
            Property(p => p.empl_m_name)
                .HasMaxLength(40);
            Property(p => p.empl_insur_93)
                .HasMaxLength(1)
                .IsFixedLength()
                .IsRequired();
            Property(p => p.empl_epid2)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_eee)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_spouse_sn)
                .HasMaxLength(40);
            Property(p => p.empl_spouse_n)
                .HasMaxLength(40);
            Property(p => p.empl_disablem)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_calc_tekm)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_address)
                .HasMaxLength(40);
            Property(p => p.empl_address_no)
                .HasMaxLength(10);
            Property(p => p.empl_zip)
                .HasMaxLength(10);
            Property(p => p.empl_city)
                .HasMaxLength(15);
            Property(p => p.empl_city2)
                .HasMaxLength(15);
            Property(p => p.empl_phone1)
                .HasMaxLength(12);
            Property(p => p.empl_phone2)
                .HasMaxLength(12);
            Property(p => p.empl_email)
                .HasMaxLength(40);
            Property(p => p.empl_bank_acc)
                .HasMaxLength(40);
            Property(p => p.empl_comments)
                .HasColumnType("text");
            Property(p => p.empl_marital)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_desc1)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc2)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc3)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc4)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc5)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc6)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc7)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc8)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc9)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc10)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc11)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc12)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc13)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc14)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc15)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc16)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc17)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc18)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc19)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc20)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc21)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc22)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc23)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc24)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc25)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc26)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc27)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc28)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc29)
                .HasMaxLength(40);
            Property(p => p.empl_ud_desc30)
                .HasMaxLength(40);
            Property(p => p.empl_ud_bl1)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl2)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl3)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl4)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl5)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl6)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl7)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl8)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl9)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl10)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl11)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl12)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl13)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl14)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl15)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl16)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl17)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl18)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl19)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl20)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl21)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl22)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl23)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl24)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl25)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl26)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl27)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl28)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl29)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ud_bl30)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_plhres_or)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_oles_ergas)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_kad)
                .HasMaxLength(4);
            Property(p => p.empl_cod_eid1)
                .HasMaxLength(6);
            Property(p => p.empl_pak_kal1)
                .HasMaxLength(4);
            Property(p => p.empl_cod_eid2)
                .HasMaxLength(6);
            Property(p => p.empl_pak_kal2)
                .HasMaxLength(4);
            Property(p => p.empl_tayt)
                .HasMaxLength(15);
            Property(p => p.empl_kart_oaed)
                .HasMaxLength(20);
            Property(p => p.empl_kart_alod)
                .HasMaxLength(20);
            Property(p => p.empl_bibl_anhl)
                .HasMaxLength(20);
            Property(p => p.empl_eidikothta)
                .HasMaxLength(20);
            Property(p => p.empl_gl_plhr)
                .HasMaxLength(30);
            Property(p => p.empl_gl_prok)
                .HasMaxLength(30);
            Property(p => p.empl_gl_dan)
                .HasMaxLength(30);
            Property(p => p.empl_adeia_alod)
                .HasMaxLength(30);
            Property(p => p.empl_first_misthotos)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_merik_apasx)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_foreign_country)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_foreign_name)
                .HasMaxLength(30);
            Property(p => p.empl_prostheta_allo)
                .HasMaxLength(20);
            Property(p => p.empl_progr_oaed)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_progr_oaed_kind)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_epid_anerg)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_epid_anerg_yp)
                .HasMaxLength(30);
            Property(p => p.empl_prosaux_doron)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_pragmat_hmeromisth)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_paramethorio)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_ekd_arxh)
                .HasMaxLength(20);
            Property(p => p.oaed_class)
                .HasMaxLength(10);
            Property(p => p.oaed_department)
                .HasMaxLength(10);
            Property(p => p.empl_merik_apasx_sse)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_cod_eid3)
                .HasMaxLength(6);
            Property(p => p.empl_pak_kal3)
                .HasMaxLength(4);
            Property(p => p.empl_karta_eisod)
                .HasMaxLength(20);
            Property(p => p.empl_xml_type)
                .HasMaxLength(4);
            Property(p => p.empl_iban)
                .HasMaxLength(40);
            Property(p => p.empl_policeidothertype)
                .HasMaxLength(2);
            Property(p => p.empl_rank)
                .HasMaxLength(3);
            Property(p => p.empl_employeecategory)
                .HasMaxLength(5);
            Property(p => p.empl_contracttype)
                .HasMaxLength(3);
            Property(p => p.empl_eidik_peript_for)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_eidik_eisf_eksair)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.companyname_etaa)
                .HasMaxLength(40);
            Property(p => p.afm_etaa)
                .HasMaxLength(9);
            Property(p => p.salary_deduction)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_kad2)
                .HasMaxLength(4);
            Property(p => p.empl_kad3)
                .HasMaxLength(4);
            Property(p => p.empl_autasfal)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_comments_entyp)
                .HasMaxLength(500);
            Property(p => p.empl_merik_apasx_insur_days)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_relat_c)
                .HasMaxLength(20);
            Property(p => p.empl_guardian)
                .HasMaxLength(40);
            Property(p => p.empl_smoker)
                .HasMaxLength(1)
                .IsFixedLength();
            Property(p => p.empl_tax_no)
                .HasMaxLength(20);
            Property(p => p.empl_active)
                .HasMaxLength(1)
                .IsFixedLength();
            HasMany<Empl_work_dates>(s => s.Empl_work_dates)
               .WithRequired(s => s.Employee)
               .HasForeignKey(s => s.empl_id);
            HasMany<EmployeeTransactions>(s => s.EmployeeTransactions)
                .WithRequired(s => s.Employee)
                .HasForeignKey(s => s.empl_id);
            /*
            HasOptional<TaxAuthority>(s => s.TaxAuthority)
                .WithMany(s => s.Employees)
                .HasForeignKey(s => s.taxaut_id);
            */
        }
    }
}
