model update
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C379
This commit is contained in:
parent
f0779f35f3
commit
267da7b9e8
4 changed files with 26 additions and 12 deletions
|
|
@ -16,9 +16,8 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
}
|
||||
|
||||
[Key]
|
||||
[Column(Order = 0)]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int IdDetalleEncuesta { get; set; }
|
||||
|
||||
public int IdEncabezadoEncuesta { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
|
|
@ -30,6 +29,8 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[StringLength(500)]
|
||||
public string TituloPregunta { get; set; }
|
||||
|
||||
[Key]
|
||||
[Column(Order = 1)]
|
||||
[StringLength(200)]
|
||||
public string NombrePregunta { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -452,16 +452,16 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
.WithOptional(e => e.Usuario)
|
||||
.HasForeignKey(e => e.UsuarioAsignado);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.HasMany(e => e.Solicitud1)
|
||||
.WithOptional(e => e.Usuario1)
|
||||
.HasForeignKey(e => e.UsuarioSistema);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.HasMany(e => e.UsuariosEncuesta)
|
||||
.WithRequired(e => e.Usuario)
|
||||
.WillCascadeOnDelete(false);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.HasMany(e => e.Solicitud1)
|
||||
.WithOptional(e => e.Usuario1)
|
||||
.HasForeignKey(e => e.UsuarioSistema);
|
||||
|
||||
modelBuilder.Entity<BitacoraDocumentos>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
|
@ -639,6 +639,12 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<DetalleEncuesta>()
|
||||
.HasMany(e => e.UsuariosEncuesta)
|
||||
.WithRequired(e => e.DetalleEncuesta)
|
||||
.HasForeignKey(e => new { e.IdEncabezadoEncuesta, e.NombrePregunta })
|
||||
.WillCascadeOnDelete(false);
|
||||
|
||||
modelBuilder.Entity<EncabezadoEncuesta>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
|
@ -877,6 +883,10 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
.Property(e => e.UsuarioSistema)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<UsuariosEncuesta>()
|
||||
.Property(e => e.NombrePregunta)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<UsuariosEncuesta>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
Convocatoria = new HashSet<Convocatoria>();
|
||||
Solicitud = new HashSet<Solicitud>();
|
||||
TareasPendientes = new HashSet<TareasPendientes>();
|
||||
Solicitud1 = new HashSet<Solicitud>();
|
||||
UsuariosEncuesta = new HashSet<UsuariosEncuesta>();
|
||||
Solicitud1 = new HashSet<Solicitud>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
|
|
@ -55,9 +55,9 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
public virtual ICollection<TareasPendientes> TareasPendientes { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<Solicitud> Solicitud1 { get; set; }
|
||||
public virtual ICollection<UsuariosEncuesta> UsuariosEncuesta { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<UsuariosEncuesta> UsuariosEncuesta { get; set; }
|
||||
public virtual ICollection<Solicitud> Solicitud1 { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,10 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int IdEncabezadoEncuesta { get; set; }
|
||||
|
||||
public int? IdDetalleEncuesta { get; set; }
|
||||
[Key]
|
||||
[Column(Order = 2)]
|
||||
[StringLength(200)]
|
||||
public string NombrePregunta { get; set; }
|
||||
|
||||
[Column(TypeName = "ntext")]
|
||||
public string Respuesta { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue