public void Configure(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder <Treballador> builder) { builder.ToTable("Treballadors"); builder.HasKey("Id"); builder.Property(c => c.Codi).HasColumnName("Codi").HasMaxLength(50).IsRequired().IsUnicode(false); builder.Property(c => c.Nom).HasColumnName("Nom").HasMaxLength(50).IsRequired().IsUnicode(false); builder.Property(c => c.PrimerCognom).HasColumnName("PrimerCognom").HasMaxLength(50).IsRequired().IsUnicode(false); builder.Property(c => c.SegonCognom).HasColumnName("SegonCognom").HasMaxLength(50).IsRequired().IsUnicode(false); builder.Property(c => c.NIF).HasColumnName("NIF").HasMaxLength(10).IsRequired().IsUnicode(false); builder.Property(c => c.NSS).HasColumnName("NSS").HasMaxLength(25).IsUnicode(false); builder.Property(c => c.Adreça).HasColumnName("Adreça").HasMaxLength(100).IsUnicode(false); builder.Property(c => c.CP).HasColumnName("CP").HasMaxLength(10).IsRequired().IsUnicode(false); builder.Property(c => c.Poblacio).HasColumnName("Poblacio").HasMaxLength(50).IsUnicode(false); builder.Property(c => c.Provincia).HasColumnName("Provincia").HasMaxLength(50).IsUnicode(false); builder.Property(c => c.Telefon1).HasColumnName("Telefon1").HasMaxLength(15).IsUnicode(false); builder.Property(c => c.Telefon2).HasColumnName("Telefon2").HasMaxLength(15).IsUnicode(false); builder.Property(c => c.Telefon3).HasColumnName("Telefon3").HasMaxLength(15).IsUnicode(false); builder.Property(c => c.Mobil1).HasColumnName("Mobil1").HasMaxLength(15).IsUnicode(false); builder.Property(c => c.Mobil2).HasColumnName("Mobil2").HasMaxLength(15).IsUnicode(false); builder.Property(c => c.Mobil3).HasColumnName("Mobil3").HasMaxLength(15).IsUnicode(false); builder.Property(c => c.Email1).HasColumnName("Email1").HasMaxLength(100).IsUnicode(false); builder.Property(c => c.Email2).HasColumnName("Email2").HasMaxLength(100).IsUnicode(false); builder.Property(c => c.Email3).HasColumnName("Email3").HasMaxLength(100).IsUnicode(false); builder.Property(c => c.DataAlta).HasColumnName("DataAlta").HasColumnType("Date").IsRequired(); builder.Property(c => c.DataBaixa).HasColumnName("DataBaixa").HasColumnType("Date"); builder.Property(c => c.Observacions).HasColumnName("Observacions").HasMaxLength(500).IsUnicode(false); }
public void Configure(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder <Funcionalidad> builder) { builder.HasKey(k => k.FuncionalidadGuid); builder.Property(p => p.FuncionalidadGuid).ValueGeneratedOnAdd(); builder.Property(p => p.Nombre).IsRequired().HasMaxLength(100); builder.Property(p => p.Descripcion).IsRequired().HasColumnType("nvarchar(max)"); builder.Property(p => p.PreRequisitos).IsRequired().HasColumnType("nvarchar(max)"); }
public void Configure(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder <ConveniTreballador> builder) { builder.ToTable("ConvenisTreballador"); builder.HasKey(c => new { c.ConveniId, c.TreballadorId }); builder.Property(c => c.DataInici).HasColumnName("DataInici").HasColumnType("Date").IsRequired(); builder.Property(c => c.DataFinal).HasColumnName("DataFinal").HasColumnType("Date"); builder.Property(c => c.Observacions).HasColumnName("Observacions").HasMaxLength(500).IsUnicode(false); }
public void Configure(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder <PlantillaCalendari> builder) { builder.ToTable("PlantillesCalendari"); builder.HasKey("Id"); builder.Property(c => c.DataInici).HasColumnName("DataInici").HasColumnType("Date").IsRequired(); builder.Property(c => c.DataFinal).HasColumnName("DataFinal").HasColumnType("Date"); builder.Property(c => c.Observacions).HasColumnName("Observacions").HasMaxLength(500).IsUnicode(false); }
public void Configure(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder <Conveni> builder) { builder.ToTable("Convenis"); builder.HasKey("Id"); builder.Property(c => c.Codi).HasColumnName("Codi").HasMaxLength(50).IsRequired().IsUnicode(false); builder.Property(c => c.Nom).HasColumnName("Nom").HasMaxLength(100).IsRequired().IsUnicode(false); builder.Property(c => c.HoresAnuals).HasColumnName("HoresAnuals").IsRequired(); builder.Property(c => c.DataInici).HasColumnName("DataInici").HasColumnType("Date").IsRequired(); builder.Property(c => c.DataFinal).HasColumnName("DataFinal").HasColumnType("Date"); builder.Property(c => c.Observacions).HasColumnName("Observacions").HasMaxLength(500).IsUnicode(false); }
public void Configure(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder <DetallPlantillaCalendari> builder) { builder.ToTable("DetallsPlantillaCalendari"); builder.HasKey("Id"); builder.Property(d => d.DataInicial).HasColumnName("DataInicial").HasColumnType("Date").IsRequired(); builder.Property(d => d.DataFinal).HasColumnName("DataFinal").HasColumnType("Date").IsRequired(); builder.Property(d => d.HoraInici1).HasColumnName("HoraInici1"); builder.Property(d => d.HoraFinal1).HasColumnName("HoraFinal1"); builder.Property(d => d.HoraInici2).HasColumnName("HoraInici2"); builder.Property(d => d.HoraFinal2).HasColumnName("HoraFinal2"); builder.Property(d => d.HoraInici3).HasColumnName("HoraInici3"); builder.Property(d => d.HoraFinal3).HasColumnName("HoraFinal3"); builder.Property(d => d.Vacances).HasColumnName("Vacances").IsRequired(); builder.Property(d => d.Observacions).HasColumnName("Observacions").HasMaxLength(500).IsUnicode(false); }
public void Configure(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder <ChatEntity> builder) { builder.ToTable("Chat"); builder.HasKey(p => p.Id); builder.Property(p => p.Id) .ValueGeneratedOnAdd(); builder.Property(p => p.Name) .IsRequired() .HasMaxLength(50); builder.Property(p => p.CreateAt) .IsRequired(); builder.Property(p => p.Description) .IsRequired(); }