using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

// namespaces...
namespace EntityFirst.Module.BusinessObjects
{
    // public classes...
    public class TaxAuthorityMap : EntityTypeConfiguration<TaxAuthority>
    {
        // public constructors...
        public TaxAuthorityMap()
        {
            HasKey(t => t.taxaut_id);
            /*HasMany<Employee>(s => s.Employees)
                .WithOptional(s => s.TaxAuthority)
                .HasForeignKey(s => s.taxaut_id);*/
            Property(t => t.taxaut_id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
            Property(t => t.taxaut_code)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(4);
            Property(t => t.taxaut_descr)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(50);
            Property(t => t.taxaut_addr)
                .IsFixedLength()
                .HasMaxLength(80);
            Property(t => t.taxaut_zipcode)
                .IsFixedLength()
                .HasMaxLength(5);
            Property(t => t.taxaut_phone_no1)
                .IsFixedLength()
                .HasMaxLength(12);
            Property(t => t.taxaut_phone_no2)
                .IsFixedLength()
                .HasMaxLength(12);
            Property(t => t.taxaut_fax_no)
                .IsFixedLength()
                .HasMaxLength(12);
            Property(t => t.taxaut_email)
                .IsFixedLength()
                .HasMaxLength(50);
            Property(t => t.taxaut_department1)
                .IsFixedLength()
                .HasMaxLength(50);
            Property(t => t.taxaut_department2)
                .IsFixedLength()
                .HasMaxLength(50);
            Property(t => t.taxaut_department3)
                .IsFixedLength()
                .HasMaxLength(50);
            Property(t => t.taxaut_department4)
                .IsFixedLength()
                .HasMaxLength(50);
            Property(t => t.taxaut_department5)
                .IsFixedLength()
                .HasMaxLength(50);
            Property(t => t.taxaut_dep_response1)
                .IsFixedLength()
                .HasMaxLength(40);
            Property(t => t.taxaut_dep_response2)
                .IsFixedLength()
                .HasMaxLength(40);
            Property(t => t.taxaut_dep_response3)
                .IsFixedLength()
                .HasMaxLength(40);
            Property(t => t.taxaut_dep_response4)
                .IsFixedLength()
                .HasMaxLength(40);
            Property(t => t.taxaut_dep_response5)
                .IsFixedLength()
                .HasMaxLength(40);
            Property(t => t.taxaut_dep_phone_no1)
                .IsFixedLength()
                .HasMaxLength(12);
            Property(t => t.taxaut_dep_phone_no2)
                .IsFixedLength()
                .HasMaxLength(12);
            Property(t => t.taxaut_dep_phone_no3)
                .IsFixedLength()
                .HasMaxLength(12);
            Property(t => t.taxaut_dep_phone_no4)
                .IsFixedLength()
                .HasMaxLength(12);
            Property(t => t.taxaut_dep_phone_no5)
                .IsFixedLength()
                .HasMaxLength(12);
            ToTable("tax_authority");
            Property(t => t.taxaut_id).HasColumnName("taxaut_id");
            Property(t => t.taxaut_code).HasColumnName("taxaut_code");
            Property(t => t.taxaut_descr).HasColumnName("taxaut_descr");
            Property(t => t.taxaut_addr).HasColumnName("taxaut_addr");
            Property(t => t.taxaut_zipcode).HasColumnName("taxaut_zipcode");
            Property(t => t.taxaut_phone_no1).HasColumnName("taxaut_phone_no1");
            Property(t => t.taxaut_phone_no2).HasColumnName("taxaut_phone_no2");
            Property(t => t.taxaut_fax_no).HasColumnName("taxaut_fax_no");
            Property(t => t.taxaut_email).HasColumnName("taxaut_email");
            Property(t => t.taxaut_department1).HasColumnName("taxaut_department1");
            Property(t => t.taxaut_department2).HasColumnName("taxaut_department2");
            Property(t => t.taxaut_department3).HasColumnName("taxaut_department3");
            Property(t => t.taxaut_department4).HasColumnName("taxaut_department4");
            Property(t => t.taxaut_department5).HasColumnName("taxaut_department5");
            Property(t => t.taxaut_dep_response1).HasColumnName("taxaut_dep_response1");
            Property(t => t.taxaut_dep_response2).HasColumnName("taxaut_dep_response2");
            Property(t => t.taxaut_dep_response3).HasColumnName("taxaut_dep_response3");
            Property(t => t.taxaut_dep_response4).HasColumnName("taxaut_dep_response4");
            Property(t => t.taxaut_dep_response5).HasColumnName("taxaut_dep_response5");
            Property(t => t.taxaut_dep_phone_no1).HasColumnName("taxaut_dep_phone_no1");
            Property(t => t.taxaut_dep_phone_no2).HasColumnName("taxaut_dep_phone_no2");
            Property(t => t.taxaut_dep_phone_no3).HasColumnName("taxaut_dep_phone_no3");
            Property(t => t.taxaut_dep_phone_no4).HasColumnName("taxaut_dep_phone_no4");
            Property(t => t.taxaut_dep_phone_no5).HasColumnName("taxaut_dep_phone_no5");
            Property(t => t.user_id_creator).HasColumnName("user_id_creator");
            Property(t => t.taxaut_update_date).HasColumnName("taxaut_update_date");
            Property(t => t.taxaut_creation_date).HasColumnName("taxaut_creation_date");
            Property(t => t.user_id_modif).HasColumnName("user_id_modif");
        }
    }
}
