Versión 2
This commit is contained in:
159
bdGrupoSanchoToro/Importaciones/ImportaGRUASGC.cs
Normal file
159
bdGrupoSanchoToro/Importaciones/ImportaGRUASGC.cs
Normal file
@@ -0,0 +1,159 @@
|
||||
using Microsoft.VisualBasic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bdGrupoSanchoToro.Importaciones
|
||||
{
|
||||
public class ImportaAccesorios
|
||||
{
|
||||
public static void Importar(byte[] Fichero)
|
||||
{
|
||||
try
|
||||
{
|
||||
var bd = tscGrupoSanchoToro.NuevoContexto();
|
||||
var accs = bd.accesorios.ToList();
|
||||
var le = bd.enumeraciones.ToList();
|
||||
|
||||
var prodsela = bd.productoselaborados.ToList();
|
||||
var gruprods = bd.gruposdeproductos.ToList();
|
||||
var lcaag = bd.codigosdeaccesoriosagrupados.ToList();
|
||||
var lusus = bd.usuarios.ToList();
|
||||
|
||||
var dsprueba = new XSD.ALMACENAC();
|
||||
|
||||
dsprueba.ReadXml(new System.IO.MemoryStream(Fichero));
|
||||
int i = 1;
|
||||
int Ultimalinea = dsprueba.Tables["Datos"].Rows.Count;
|
||||
foreach (XSD.ALMACENAC.DatosRow Proant in dsprueba.Tables["Datos"].Rows)
|
||||
{
|
||||
try
|
||||
{
|
||||
bdGrupoSanchoToro.db.accesorios Pronue =accs.FirstOrDefault(x => x.CodigoDeAccesorio == Proant.ALCOD.Trim());
|
||||
if (Pronue==null)
|
||||
{
|
||||
Pronue = new bdGrupoSanchoToro.db.accesorios();
|
||||
bd.accesorios.Add(Pronue);
|
||||
}
|
||||
Pronue.CodigoDeAccesorio = Proant.ALCOD;
|
||||
Pronue.DescripcionDeAccesorio = Proant.ALDES;
|
||||
Pronue.idGrupoDeProducto = null;
|
||||
if (Proant.ALGPR.Trim()!="")
|
||||
{
|
||||
var grupodeproducto = gruprods.FirstOrDefault(x => x.CodigoGrupoProductos == Proant.ALGPR.Trim());
|
||||
if (grupodeproducto!=null) Pronue.idGrupoDeProducto = grupodeproducto.idGrupoDeProducto;
|
||||
}
|
||||
Pronue.idProductoElaborado = null;
|
||||
if (Proant.ALCPEC.Trim()!="")
|
||||
{
|
||||
var productoelaborado =prodsela.FirstOrDefault(x => x.CodigoDeProductoElaborado == Proant.ALCPEC.Trim());
|
||||
if (productoelaborado!=null) Pronue.idProductoElaborado = productoelaborado.idProductoElaborado;
|
||||
}
|
||||
Pronue.idExpresionDeCantidad = null;
|
||||
if (Proant.ALECAN.Trim()!="")
|
||||
{
|
||||
Pronue.idExpresionDeCantidad = le.First(x => x.Codigo == "ECAN." + Proant.ALECAN.Trim()).idEnumeracion;
|
||||
}
|
||||
else
|
||||
{
|
||||
Pronue.idExpresionDeCantidad = null;
|
||||
}
|
||||
|
||||
var enumeracion = le.First(x => x.Codigo == "TAC." + Proant.ALTIPO.Trim());
|
||||
Pronue.idTipoDeAccesorio = enumeracion.idEnumeracion;
|
||||
|
||||
Pronue.idSubtipoDeAccesorio = le.First(x => x.Codigo.Trim() == "STA." + Proant.ALSTIP.Trim()).idEnumeracion;
|
||||
|
||||
Pronue.idCodigoAgrupado = null;
|
||||
if (Proant.ALCODAG.Trim()!="")
|
||||
{
|
||||
var Codagru = lcaag.FirstOrDefault(x => x.CodigoAgrupado == Proant.ALCODAG.Trim());
|
||||
if (Codagru!=null) Pronue.idCodigoAgrupado = Codagru.idCodigoDeaccesorioAgrupado;
|
||||
}
|
||||
Pronue.RangoPermitido1 = double.Parse(Proant.ALRANGO1, CultureInfo.InvariantCulture);
|
||||
Pronue.RangoPermitido2 = double.Parse(Proant.ALRANGO2, CultureInfo.InvariantCulture);
|
||||
Pronue.Facturable = false;
|
||||
if (Proant.ALFAC.Trim() == "S")
|
||||
{
|
||||
Pronue.Facturable = true;
|
||||
}
|
||||
Pronue.Precio = double.Parse(Proant.ALPRE, CultureInfo.InvariantCulture);
|
||||
Pronue.PrecioDeCosteMedio = double.Parse(Proant.ALPCM, CultureInfo.InvariantCulture);
|
||||
Pronue.Existencia = double.Parse(Proant.ALEXI, CultureInfo.InvariantCulture);
|
||||
Pronue.ExistenciaMinima = double.Parse(Proant.ALEXIM, CultureInfo.InvariantCulture);
|
||||
Pronue.Peso = double.Parse(Proant.ALPESO, CultureInfo.InvariantCulture);
|
||||
Pronue.PrecioDeCosteAplicado = double.Parse(Proant.ALPCOA, CultureInfo.InvariantCulture);
|
||||
Pronue.CuentaDeCompras1 = Proant.ALNCUC1;
|
||||
Pronue.CuentaDeCompras2 = Proant.ALNCUC2;
|
||||
Pronue.CuentaDeCompras3 = Proant.ALNCUC3;
|
||||
Pronue.CuentaDeCompras4 = Proant.ALNCUC4;
|
||||
Pronue.CuentaDeVentas1 = Proant.ALNCUV1;
|
||||
Pronue.CuentaDeVentas2 = Proant.ALNCUV2;
|
||||
Pronue.CuentaDeVentas3 = Proant.ALNCUV3;
|
||||
Pronue.CuentaDeVentas4 = Proant.ALNCUV4;
|
||||
//if (bd.cuentasanaliticas.Any(x => x.CodigoCuenta.Trim() == Proant.ALNCUA.Trim()))
|
||||
//{
|
||||
// var Cuenta = bd.cuentasanaliticas.First(x => x.CodigoCuenta == Proant.ALNCUA.Trim());
|
||||
// Pronue.idCuentaAnalitica = 0; // cuentasanaliticas.idcuentasanaliticas
|
||||
//}
|
||||
Pronue.FechaDeAlta = (DateOnly)tsUtilidades.Extensiones.StringExtensions.FechaStringADateOnly(Proant.ALFAL);
|
||||
Pronue.FechaDeBaja = tsUtilidades.Extensiones.StringExtensions.FechaStringADateOnly(Proant.ALFBA);
|
||||
|
||||
Pronue.idGrupoDeAccesorios = le.First(x => x.Codigo == "GRA." + Proant.ALGRU.Trim()).idEnumeracion;
|
||||
|
||||
Pronue.idNaturalezaDelGasto = le.First(x => x.Codigo == "NGA." + Proant.ALNGA.Trim()).idEnumeracion;
|
||||
Pronue.Subvencion = false;
|
||||
if (Proant.ALSSN.Trim() == "S")
|
||||
{
|
||||
Pronue.Subvencion = true;
|
||||
}
|
||||
Pronue.PorcentajedeSubvencion = double.Parse(Proant.ALSPO, CultureInfo.InvariantCulture);
|
||||
Pronue.ReferenciaDelProveedor = Proant.ALSLA;
|
||||
Pronue.idTipoDeIva = null;
|
||||
if (Proant.ALTIVA.Trim()!="")
|
||||
{
|
||||
Pronue.idTipoDeIva = le.First(x => x.Codigo == "TIVA." + Proant.ALTIVA.Trim()).idEnumeracion;
|
||||
}
|
||||
Pronue.FechaUltimoRecuento = tsUtilidades.Extensiones.StringExtensions.FechaStringADate(Proant.ALFURE);
|
||||
Pronue.ActualizacionExistencias = false;
|
||||
if (double.Parse(Proant.ALNL4) == 1)
|
||||
{
|
||||
Pronue.ActualizacionExistencias = true;
|
||||
}
|
||||
Pronue.idModificadoPor = null;
|
||||
if (Proant.ALUUM.Trim()!="")
|
||||
{
|
||||
var usuario = lusus.FirstOrDefault(x => x.Usuario == Proant.ALUUM.Trim());
|
||||
if(usuario!=null) Pronue.idModificadoPor = usuario.idUsuario;
|
||||
}
|
||||
string minuseg = (double.Parse(Proant.ALHUM, CultureInfo.InvariantCulture) * 100).ToString();
|
||||
var fechahora = tsUtilidades.Extensiones.StringExtensions.FechaHoraStringADateTime(Proant.ALFUM + "." + minuseg.PadLeft(4, '0').Substring(0, 4));
|
||||
Pronue.FechaUltimaModificacion = fechahora;
|
||||
Pronue.Situacion = Proant.ALSIT;
|
||||
Pronue.Observaciones = Proant.ALOBS;
|
||||
i = i + 1;
|
||||
if (i > 1000)
|
||||
{
|
||||
i=0;
|
||||
bd.SaveChanges();
|
||||
bd = tscGrupoSanchoToro.NuevoContexto();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(ex.Message, ex);
|
||||
}
|
||||
bd.SaveChanges();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
111
bdGrupoSanchoToro/Importaciones/ImportarTodo.cs
Normal file
111
bdGrupoSanchoToro/Importaciones/ImportarTodo.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bdGrupoSanchoToro.Importaciones
|
||||
{
|
||||
public static class ImportarTodo
|
||||
{
|
||||
public delegate void DelegadoErroresImportacion(Exception ex);
|
||||
|
||||
delegate void DelegadoImportar(Byte[] Datos);
|
||||
public static void Importar(DelegadoErroresImportacion de)
|
||||
{
|
||||
tscGrupoSanchoToro bd = tscGrupoSanchoToro.NuevoContexto();
|
||||
|
||||
//00
|
||||
// Importa("GRUASGC", bdGrupoSanchoToro.Importaciones.ImportarGRUASGC.Importar, de); //00
|
||||
//Importa("GRUPRO", bdGrupoSanchoToro.Importaciones.ImportaGrupoProductos.Importar, de); //01
|
||||
//Importa("CAMPAÑAS", bdGrupoSanchoToro.Importaciones.ImportaCampañas.Importar, de); //02
|
||||
//Importa("PRODUCTOS", bdGrupoSanchoToro.Importaciones.ImportaProductos.Importar, de); //03
|
||||
//Importa("PROBRU", bdGrupoSanchoToro.Importaciones.ImportaProductosBrutos.Importar, de); //04
|
||||
//Importa("CTESFABC", bdGrupoSanchoToro.Importaciones.ImportaGrupoEnumeraciones.Importar, de); //00
|
||||
//Importa("CTESFABL", bdGrupoSanchoToro.Importaciones.ImportaEnumeraciones.Importar, de); //00
|
||||
//Importa("PROELA1", bdGrupoSanchoToro.Importaciones.ImportaProductosElaborados.Importar, de); //05
|
||||
//Importa("PROELA2", bdGrupoSanchoToro.Importaciones.ImportaProductosElaborados.Importar, de); //05
|
||||
//Importa("CODAGRU", bdGrupoSanchoToro.Importaciones.ImportaCodigosDeAccesoriosAgrupados.Importar, de); //07
|
||||
//Importa("ALMACENAC", bdGrupoSanchoToro.Importaciones.ImportaAccesorios.Importar, de); //06
|
||||
//Importa("TABLASC", bdGrupoSanchoToro.Importaciones.ImportaTablas.Importar, de); //08
|
||||
//Importa("TABLASL", bdGrupoSanchoToro.Importaciones.ImportaParametrosDeTablas.Importar, de); //09
|
||||
//Importa("ENTIBAN", bdGrupoSanchoToro.Importaciones.ImportaEntidadesBancarias.Importar, de); //10
|
||||
//Importa("AGEBAN", bdGrupoSanchoToro.Importaciones.ImportaAgenciasBancarias.Importar, de); //11
|
||||
//Importa("BANCOSEMP", bdGrupoSanchoToro.Importaciones.ImportaBancosEmpresa.Importar, de); //12
|
||||
//Importa("FPAGO", bdGrupoSanchoToro.Importaciones.ImportaFormasDePago.Importar, de); //13
|
||||
//Importa("PROVEEDORES", bdGrupoSanchoToro.Importaciones.ImportaProveedores.Importar, de); //14
|
||||
//Importa("PROVEEDORH", bdGrupoSanchoToro.Importaciones.ImportaProveedoresh.Importar, de); //25
|
||||
//Importa("CLIENTES", bdGrupoSanchoToro.Importaciones.ImportaClientes.Importar, de); //15
|
||||
//Importa("CLIENTESH", bdGrupoSanchoToro.Importaciones.ImportaClientesh.Importar, de); //26
|
||||
// Importa("PERSONAL", bdGrupoSanchoToro.Importaciones.ImportaClientesh.Importar, de); //26
|
||||
}
|
||||
|
||||
//public static void ImportarPersonal(DelegadoErroresImportacion de)
|
||||
//{
|
||||
// tscGrupoSanchoToro bd = tscGrupoSanchoToro.NuevoContexto();
|
||||
|
||||
// Importa("PERSONAL", bdGrupoSanchoToro.Importaciones.ImportaPersonal.Importar, de);
|
||||
//}
|
||||
|
||||
static void Importa(string NombreFicheroEnHP, DelegadoImportar di, DelegadoErroresImportacion de)
|
||||
{
|
||||
tscGrupoSanchoToro bd = tscGrupoSanchoToro.NuevoContexto();
|
||||
byte[]? datos = null;
|
||||
try
|
||||
{
|
||||
datos = DescargarDeHP(bd, NombreFicheroEnHP);
|
||||
if (datos != null) di(datos);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
de(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static byte[]? DescargarDeHP(tscGrupoSanchoToro bd, string Fichero)
|
||||
{
|
||||
string Fich = "/var/tecnosis/DATAXML/PENDIENTES/" + Fichero + ".DATA";
|
||||
string Fichi = "/var/tecnosis/DATAXML/PENDIENTES/" + Fichero + ".IGUAL";
|
||||
string Fichh = "/var/tecnosis/DATAXML/HISTORICO/" + Fichero + ".DATA";
|
||||
var sftp = ConfiguraFTPHP(bd);
|
||||
var st = new MemoryStream();
|
||||
if (tsFluentFTP.ftp.ExisteFichero(Fich, sftp))
|
||||
{
|
||||
tsFluentFTP.ftp.DescargaFichero(Fich, st, sftp);
|
||||
// tsFluentFTP.ftp.RenombraFichero(Fich,Fichh, sftp);
|
||||
return st.ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!tsFluentFTP.ftp.ExisteFichero(Fichi, sftp)) throw new Exception("No se ha Generado el Fichero " + Fichero);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static tsFluentFTP.ServidorFTP ConfiguraFTPHP(tscGrupoSanchoToro bd)
|
||||
{
|
||||
try
|
||||
{
|
||||
string sCadServidor = (from c in bd.enumeraciones
|
||||
where c.Codigo == "VAR.HP9000"
|
||||
select c).First().ValorAlfabeticoLargo;
|
||||
string Servidor = sCadServidor.Split("@")[0];
|
||||
string Usuario = sCadServidor.Split("@")[1].Split(":")[0];
|
||||
string contraseña = sCadServidor.Split("@")[1].Split(":")[1];
|
||||
int Puerto = 21;
|
||||
bool Pasivo = false;
|
||||
tsFluentFTP.SeguridadFTP Seguridad;
|
||||
Seguridad = tsFluentFTP.SeguridadFTP.Ninguna;
|
||||
int Timeout = 60000;
|
||||
var ftp = new tsFluentFTP.ServidorFTP(Servidor, Puerto, Usuario, contraseña, Seguridad, Pasivo, Timeout);
|
||||
return ftp;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
<PackageReference Include="System.ServiceModel.Security" Version="6.0.*" />
|
||||
<PackageReference Include="tsCorreos" Version="1.0.2" />
|
||||
<PackageReference Include="tsEFCore8" Version="1.0.1" />
|
||||
<PackageReference Include="tsFluentFTPNET" Version="1.0.0" />
|
||||
<PackageReference Include="tsUtilidades" Version="1.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -30,4 +31,8 @@
|
||||
<Folder Include="db\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Importaciones\ImportaGRUASGC.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
19
bdGrupoSanchoToro/db/aplicacionesasientos.cs
Normal file
19
bdGrupoSanchoToro/db/aplicacionesasientos.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class aplicacionesasientos
|
||||
{
|
||||
public int idAplicacionAsiento { get; set; }
|
||||
|
||||
public int? Tipo { get; set; }
|
||||
|
||||
public int? idAplicacion { get; set; }
|
||||
|
||||
public int? idAsiento { get; set; }
|
||||
|
||||
public virtual asientos? idAsientoNavigation { get; set; }
|
||||
}
|
||||
39
bdGrupoSanchoToro/db/apuntes.cs
Normal file
39
bdGrupoSanchoToro/db/apuntes.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class apuntes
|
||||
{
|
||||
public int idApunte { get; set; }
|
||||
|
||||
public int idCuenta { get; set; }
|
||||
|
||||
public string? Concepto { get; set; }
|
||||
|
||||
public string? NumeroDocumento { get; set; }
|
||||
|
||||
public double Debe { get; set; }
|
||||
|
||||
public double Haber { get; set; }
|
||||
|
||||
public int idAsiento { get; set; }
|
||||
|
||||
public int? idConcepto { get; set; }
|
||||
|
||||
public DateTime? FechaPunteo { get; set; }
|
||||
|
||||
public int? TipoDocumento { get; set; }
|
||||
|
||||
public int? idConciliacion { get; set; }
|
||||
|
||||
public virtual asientos idAsientoNavigation { get; set; } = null!;
|
||||
|
||||
public virtual conceptosapuntes? idConceptoNavigation { get; set; }
|
||||
|
||||
public virtual conciliacionesbancarias? idConciliacionNavigation { get; set; }
|
||||
|
||||
public virtual cuentas idCuentaNavigation { get; set; } = null!;
|
||||
}
|
||||
33
bdGrupoSanchoToro/db/apuntesmodelo.cs
Normal file
33
bdGrupoSanchoToro/db/apuntesmodelo.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class apuntesmodelo
|
||||
{
|
||||
public int idApunteModelo { get; set; }
|
||||
|
||||
public string NumeroCuenta { get; set; } = null!;
|
||||
|
||||
public string? Concepto { get; set; }
|
||||
|
||||
public double Debe { get; set; }
|
||||
|
||||
public double Haber { get; set; }
|
||||
|
||||
public int idAsientoModelo { get; set; }
|
||||
|
||||
public int? idConcepto { get; set; }
|
||||
|
||||
public string? NumeroDocumento { get; set; }
|
||||
|
||||
public int? TipoDocumento { get; set; }
|
||||
|
||||
public int Orden { get; set; }
|
||||
|
||||
public virtual asientosmodelos idAsientoModeloNavigation { get; set; } = null!;
|
||||
|
||||
public virtual conceptosapuntes? idConceptoNavigation { get; set; }
|
||||
}
|
||||
@@ -37,6 +37,8 @@ public partial class articulos
|
||||
|
||||
public virtual ICollection<detallesalbaranes> detallesalbaranes { get; set; } = new List<detallesalbaranes>();
|
||||
|
||||
public virtual gruasparticulares? gruasparticulares { get; set; }
|
||||
|
||||
public virtual ficheros? idFicheroNavigation { get; set; }
|
||||
|
||||
public virtual productos? idProductoNavigation { get; set; }
|
||||
|
||||
39
bdGrupoSanchoToro/db/asientos.cs
Normal file
39
bdGrupoSanchoToro/db/asientos.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class asientos
|
||||
{
|
||||
public int idAsiento { get; set; }
|
||||
|
||||
public DateOnly Fecha { get; set; }
|
||||
|
||||
public int idEjercicio { get; set; }
|
||||
|
||||
public double Importe { get; set; }
|
||||
|
||||
public int? NumeroAsiento { get; set; }
|
||||
|
||||
public int Tipo { get; set; }
|
||||
|
||||
public DateOnly FechaIntroduccion { get; set; }
|
||||
|
||||
public int? idUsuario { get; set; }
|
||||
|
||||
public int? idAsientoModelo { get; set; }
|
||||
|
||||
public DateTime? FechaPunteo { get; set; }
|
||||
|
||||
public virtual ICollection<aplicacionesasientos> aplicacionesasientos { get; set; } = new List<aplicacionesasientos>();
|
||||
|
||||
public virtual ICollection<apuntes> apuntes { get; set; } = new List<apuntes>();
|
||||
|
||||
public virtual asientosmodelos? idAsientoModeloNavigation { get; set; }
|
||||
|
||||
public virtual ejercicioscontables idEjercicioNavigation { get; set; } = null!;
|
||||
|
||||
public virtual usuarios? idUsuarioNavigation { get; set; }
|
||||
}
|
||||
25
bdGrupoSanchoToro/db/asientosmodelos.cs
Normal file
25
bdGrupoSanchoToro/db/asientosmodelos.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class asientosmodelos
|
||||
{
|
||||
public int idAsientoModelo { get; set; }
|
||||
|
||||
public string Codigo { get; set; } = null!;
|
||||
|
||||
public DateTime FechaIntroduccion { get; set; }
|
||||
|
||||
public int? idUsuario { get; set; }
|
||||
|
||||
public string Descripcion { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<apuntesmodelo> apuntesmodelo { get; set; } = new List<apuntesmodelo>();
|
||||
|
||||
public virtual ICollection<asientos> asientos { get; set; } = new List<asientos>();
|
||||
|
||||
public virtual usuarios? idUsuarioNavigation { get; set; }
|
||||
}
|
||||
27
bdGrupoSanchoToro/db/celdasinformescontables.cs
Normal file
27
bdGrupoSanchoToro/db/celdasinformescontables.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class celdasinformescontables
|
||||
{
|
||||
public int idCelda { get; set; }
|
||||
|
||||
public int Hoja { get; set; }
|
||||
|
||||
public int Fila { get; set; }
|
||||
|
||||
public string Columna { get; set; } = null!;
|
||||
|
||||
public int idInformeContable { get; set; }
|
||||
|
||||
public string? Observaciones { get; set; }
|
||||
|
||||
public string NombreCampo { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<cuentasceldasinformescontables> cuentasceldasinformescontables { get; set; } = new List<cuentasceldasinformescontables>();
|
||||
|
||||
public virtual informescontables idInformeContableNavigation { get; set; } = null!;
|
||||
}
|
||||
19
bdGrupoSanchoToro/db/conceptosapuntes.cs
Normal file
19
bdGrupoSanchoToro/db/conceptosapuntes.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class conceptosapuntes
|
||||
{
|
||||
public int idConcepto { get; set; }
|
||||
|
||||
public string Concepto { get; set; } = null!;
|
||||
|
||||
public string Codigo { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<apuntes> apuntes { get; set; } = new List<apuntes>();
|
||||
|
||||
public virtual ICollection<apuntesmodelo> apuntesmodelo { get; set; } = new List<apuntesmodelo>();
|
||||
}
|
||||
@@ -23,6 +23,8 @@ public partial class conciliacionesbancarias
|
||||
|
||||
public int idCaja { get; set; }
|
||||
|
||||
public virtual ICollection<apuntes> apuntes { get; set; } = new List<apuntes>();
|
||||
|
||||
public virtual cajas idCajaNavigation { get; set; } = null!;
|
||||
|
||||
public virtual usuarios? idUsuarioNavigation { get; set; }
|
||||
|
||||
55
bdGrupoSanchoToro/db/cuentas.cs
Normal file
55
bdGrupoSanchoToro/db/cuentas.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class cuentas
|
||||
{
|
||||
public int idCuenta { get; set; }
|
||||
|
||||
public string? Mote { get; set; }
|
||||
|
||||
public string Denominacion { get; set; } = null!;
|
||||
|
||||
public double PresupuestoEnero { get; set; }
|
||||
|
||||
public double PresupuestoFebrero { get; set; }
|
||||
|
||||
public double PresupuestoMarzo { get; set; }
|
||||
|
||||
public double PresupuestoAbril { get; set; }
|
||||
|
||||
public double PresupuestoMayo { get; set; }
|
||||
|
||||
public double PresupuestoJunio { get; set; }
|
||||
|
||||
public double PresupuestoJulio { get; set; }
|
||||
|
||||
public double PresupuestoAgosto { get; set; }
|
||||
|
||||
public double PresupuestoSeptiembre { get; set; }
|
||||
|
||||
public double PresupuestoOctubre { get; set; }
|
||||
|
||||
public double PresupuestoNoviembre { get; set; }
|
||||
|
||||
public double PresupuestoDiciembre { get; set; }
|
||||
|
||||
public string? Observaciones { get; set; }
|
||||
|
||||
public string NumeroCuenta { get; set; } = null!;
|
||||
|
||||
public int idEjercicio { get; set; }
|
||||
|
||||
public int? idEmpresaAmortizacion { get; set; }
|
||||
|
||||
public bool EsCuentaFinal { get; set; }
|
||||
|
||||
public virtual ICollection<apuntes> apuntes { get; set; } = new List<apuntes>();
|
||||
|
||||
public virtual ejercicioscontables idEjercicioNavigation { get; set; } = null!;
|
||||
|
||||
public virtual enumeraciones? idEmpresaAmortizacionNavigation { get; set; }
|
||||
}
|
||||
23
bdGrupoSanchoToro/db/cuentasceldasinformescontables.cs
Normal file
23
bdGrupoSanchoToro/db/cuentasceldasinformescontables.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class cuentasceldasinformescontables
|
||||
{
|
||||
public int idCuenta { get; set; }
|
||||
|
||||
public string NumeroCuenta { get; set; } = null!;
|
||||
|
||||
public int Factor { get; set; }
|
||||
|
||||
public bool SoloSiPositivo { get; set; }
|
||||
|
||||
public bool SoloSiNegativo { get; set; }
|
||||
|
||||
public int? idCelda { get; set; }
|
||||
|
||||
public virtual celdasinformescontables? idCeldaNavigation { get; set; }
|
||||
}
|
||||
31
bdGrupoSanchoToro/db/ejercicioscontables.cs
Normal file
31
bdGrupoSanchoToro/db/ejercicioscontables.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class ejercicioscontables
|
||||
{
|
||||
public int idEjercicio { get; set; }
|
||||
|
||||
public DateOnly FechaInicio { get; set; }
|
||||
|
||||
public DateOnly FechaFin { get; set; }
|
||||
|
||||
public DateOnly FechaApertura { get; set; }
|
||||
|
||||
public DateOnly? FechaCierre { get; set; }
|
||||
|
||||
public int? idEmpresa { get; set; }
|
||||
|
||||
public string? NivelesCuentas { get; set; }
|
||||
|
||||
public string Descripcion { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<asientos> asientos { get; set; } = new List<asientos>();
|
||||
|
||||
public virtual ICollection<cuentas> cuentas { get; set; } = new List<cuentas>();
|
||||
|
||||
public virtual empresas? idEmpresaNavigation { get; set; }
|
||||
}
|
||||
@@ -25,12 +25,16 @@ public partial class empresas
|
||||
|
||||
public bool DescAmpliadaEnFE { get; set; }
|
||||
|
||||
public string Codigo { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<almacenes> almacenes { get; set; } = new List<almacenes>();
|
||||
|
||||
public virtual ICollection<cajas> cajas { get; set; } = new List<cajas>();
|
||||
|
||||
public virtual ICollection<cuentascorreo> cuentascorreo { get; set; } = new List<cuentascorreo>();
|
||||
|
||||
public virtual ICollection<ejercicioscontables> ejercicioscontables { get; set; } = new List<ejercicioscontables>();
|
||||
|
||||
public virtual ICollection<entidades> entidades { get; set; } = new List<entidades>();
|
||||
|
||||
public virtual ficheros? idLogo1Navigation { get; set; }
|
||||
|
||||
@@ -43,6 +43,8 @@ public partial class enumeraciones
|
||||
|
||||
public DateTime? Fecha2 { get; set; }
|
||||
|
||||
public virtual ICollection<cuentas> cuentas { get; set; } = new List<cuentas>();
|
||||
|
||||
public virtual ICollection<detallesfacturas> detallesfacturas { get; set; } = new List<detallesfacturas>();
|
||||
|
||||
public virtual ICollection<detallesfacturasrecibidas> detallesfacturasrecibidas { get; set; } = new List<detallesfacturasrecibidas>();
|
||||
|
||||
@@ -51,6 +51,8 @@ public partial class ficheros
|
||||
|
||||
public virtual enumeraciones? idTipoNavigation { get; set; }
|
||||
|
||||
public virtual ICollection<informescontables> informescontables { get; set; } = new List<informescontables>();
|
||||
|
||||
public virtual ICollection<movimientoscaja> movimientoscaja { get; set; } = new List<movimientoscaja>();
|
||||
|
||||
public virtual ICollection<plantillas> plantillas { get; set; } = new List<plantillas>();
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class formulas
|
||||
{
|
||||
public int idFormula { get; set; }
|
||||
|
||||
public string Codigo { get; set; } = null!;
|
||||
|
||||
public string Descripcion { get; set; } = null!;
|
||||
|
||||
public string? Formula { get; set; }
|
||||
|
||||
public int Tipo { get; set; }
|
||||
}
|
||||
15
bdGrupoSanchoToro/db/gruasparticulares.cs
Normal file
15
bdGrupoSanchoToro/db/gruasparticulares.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class gruasparticulares
|
||||
{
|
||||
public int idArticulo { get; set; }
|
||||
|
||||
public string? Codigo { get; set; }
|
||||
|
||||
public virtual articulos idArticuloNavigation { get; set; } = null!;
|
||||
}
|
||||
21
bdGrupoSanchoToro/db/informescontables.cs
Normal file
21
bdGrupoSanchoToro/db/informescontables.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class informescontables
|
||||
{
|
||||
public int idInforme { get; set; }
|
||||
|
||||
public string? Descripcion { get; set; }
|
||||
|
||||
public int? idFichero { get; set; }
|
||||
|
||||
public string Codigo { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<celdasinformescontables> celdasinformescontables { get; set; } = new List<celdasinformescontables>();
|
||||
|
||||
public virtual ficheros? idFicheroNavigation { get; set; }
|
||||
}
|
||||
15
bdGrupoSanchoToro/db/marcasgruas.cs
Normal file
15
bdGrupoSanchoToro/db/marcasgruas.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class marcasgruas
|
||||
{
|
||||
public int idMarca { get; set; }
|
||||
|
||||
public string? Marca { get; set; }
|
||||
|
||||
public virtual ICollection<modelosgruas> modelosgruas { get; set; } = new List<modelosgruas>();
|
||||
}
|
||||
29
bdGrupoSanchoToro/db/modelosgruas.cs
Normal file
29
bdGrupoSanchoToro/db/modelosgruas.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class modelosgruas
|
||||
{
|
||||
public int idProducto { get; set; }
|
||||
|
||||
public string Modelo { get; set; } = null!;
|
||||
|
||||
public int idMarca { get; set; }
|
||||
|
||||
public DateTime? FechaAlta { get; set; }
|
||||
|
||||
public DateTime? FechaBaja { get; set; }
|
||||
|
||||
public virtual marcasgruas idMarcaNavigation { get; set; } = null!;
|
||||
|
||||
public virtual productos idProductoNavigation { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<tablaalturas> tablaalturas { get; set; } = new List<tablaalturas>();
|
||||
|
||||
public virtual ICollection<tablaplumas> tablaplumas { get; set; } = new List<tablaplumas>();
|
||||
|
||||
public virtual ICollection<versiones> versiones { get; set; } = new List<versiones>();
|
||||
}
|
||||
@@ -9,13 +9,65 @@ public partial class productos
|
||||
{
|
||||
public int idProducto { get; set; }
|
||||
|
||||
public string? DescripcionAbreviada { get; set; }
|
||||
|
||||
public string Descripcion { get; set; } = null!;
|
||||
|
||||
public DateTime? FechaBaja { get; set; }
|
||||
public int? idFamilia { get; set; }
|
||||
|
||||
public int? idTipoHomologacion { get; set; }
|
||||
|
||||
public bool? Servicio { get; set; }
|
||||
|
||||
public string? ReferenciaFabrica { get; set; }
|
||||
|
||||
public int? idTipoProducto { get; set; }
|
||||
|
||||
public string? CodigoBarras { get; set; }
|
||||
|
||||
public string? NumeroSerie { get; set; }
|
||||
|
||||
public string? PrefijoNumeroSerie { get; set; }
|
||||
|
||||
public double? UnidadesPorEmbalaje { get; set; }
|
||||
|
||||
public double Peso { get; set; }
|
||||
|
||||
public int? idCodigoImpresion { get; set; }
|
||||
|
||||
public string? Marca { get; set; }
|
||||
|
||||
public string? Modelo { get; set; }
|
||||
|
||||
public bool? VentaGruaUsada { get; set; }
|
||||
|
||||
public double? PrecioCosteMedio { get; set; }
|
||||
|
||||
public double? UltimoPrecioCoste { get; set; }
|
||||
|
||||
public double PrecioVenta { get; set; }
|
||||
|
||||
public double PrecioAlquiler { get; set; }
|
||||
public DateTime? FechaBaja { get; set; }
|
||||
|
||||
public double? PorcentajeDescuento { get; set; }
|
||||
|
||||
public int? idFamiliaHomologacion { get; set; }
|
||||
|
||||
public double? ExistenciasTotal { get; set; }
|
||||
|
||||
public string? StockMinimo { get; set; }
|
||||
|
||||
public double? ExistenciasMedias { get; set; }
|
||||
|
||||
public string? ModeloGruaPatas { get; set; }
|
||||
|
||||
public string? ModelosPatas { get; set; }
|
||||
|
||||
public string? CorrespondenciaPatas { get; set; }
|
||||
|
||||
public string? Ubicacion { get; set; }
|
||||
|
||||
public string? ControlarEnAlbaran { get; set; }
|
||||
|
||||
public int? idUsuarioCreador { get; set; }
|
||||
|
||||
@@ -23,62 +75,6 @@ public partial class productos
|
||||
|
||||
public string? Observaciones { get; set; }
|
||||
|
||||
public bool? FacturarComoVentaPorDefecto { get; set; }
|
||||
|
||||
public string? Codigo { get; set; }
|
||||
|
||||
public double UltimoPrecioCompra { get; set; }
|
||||
|
||||
public double Peso { get; set; }
|
||||
|
||||
public double Volumen { get; set; }
|
||||
|
||||
public double HorasMontaje { get; set; }
|
||||
|
||||
public double HorasDesmontaje { get; set; }
|
||||
|
||||
public double TotalUnidades { get; set; }
|
||||
|
||||
public double UnidadesInicialesOFabricadas { get; set; }
|
||||
|
||||
public double UnidadesCompradas { get; set; }
|
||||
|
||||
public double UnidadesVendidas { get; set; }
|
||||
|
||||
public double UnidadesAlquiladas { get; set; }
|
||||
|
||||
public double UnidadesAveriadas { get; set; }
|
||||
|
||||
public double UnidadesDesechadas { get; set; }
|
||||
|
||||
public double UnidadesSubAlquiladas { get; set; }
|
||||
|
||||
public double PorcentajeDesgasteDiaAlquilado { get; set; }
|
||||
|
||||
public int NumeroAsientos { get; set; }
|
||||
|
||||
public int Tipo { get; set; }
|
||||
|
||||
public int NumeroFilas { get; set; }
|
||||
|
||||
public bool PrecioPorDia { get; set; }
|
||||
|
||||
public bool PrecioPorAsiento { get; set; }
|
||||
|
||||
public bool PrecioPorKm { get; set; }
|
||||
|
||||
public double PrecioMinimo { get; set; }
|
||||
|
||||
public double IncrementoGastosGenerales { get; set; }
|
||||
|
||||
public int Ancho { get; set; }
|
||||
|
||||
public int Largo { get; set; }
|
||||
|
||||
public bool IncluyeTarima { get; set; }
|
||||
|
||||
public bool IncluyeIluminacion { get; set; }
|
||||
|
||||
public int idEmpresa { get; set; }
|
||||
|
||||
public virtual ICollection<articulos> articulos { get; set; } = new List<articulos>();
|
||||
@@ -97,5 +93,7 @@ public partial class productos
|
||||
|
||||
public virtual usuarios? idUsuarioModificadorNavigation { get; set; }
|
||||
|
||||
public virtual modelosgruas? modelosgruas { get; set; }
|
||||
|
||||
public virtual ICollection<stocks> stocks { get; set; } = new List<stocks>();
|
||||
}
|
||||
|
||||
23
bdGrupoSanchoToro/db/tablaalturas.cs
Normal file
23
bdGrupoSanchoToro/db/tablaalturas.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class tablaalturas
|
||||
{
|
||||
public int idAltura { get; set; }
|
||||
|
||||
public int idModelo { get; set; }
|
||||
|
||||
public int? idVersion { get; set; }
|
||||
|
||||
public double Altura { get; set; }
|
||||
|
||||
public string? Observaciones { get; set; }
|
||||
|
||||
public virtual modelosgruas idModeloNavigation { get; set; } = null!;
|
||||
|
||||
public virtual versiones? idVersionNavigation { get; set; }
|
||||
}
|
||||
23
bdGrupoSanchoToro/db/tablaplumas.cs
Normal file
23
bdGrupoSanchoToro/db/tablaplumas.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class tablaplumas
|
||||
{
|
||||
public int idPluma { get; set; }
|
||||
|
||||
public int idModelo { get; set; }
|
||||
|
||||
public double Pluma { get; set; }
|
||||
|
||||
public double KgsPunta { get; set; }
|
||||
|
||||
public double KgsMaximo { get; set; }
|
||||
|
||||
public string? Observaciones { get; set; }
|
||||
|
||||
public virtual modelosgruas idModeloNavigation { get; set; } = null!;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class trabajador
|
||||
{
|
||||
public int idTrabajador { get; set; }
|
||||
|
||||
public string? DocumentoIdentidad { get; set; }
|
||||
|
||||
public string? Apellidos { get; set; }
|
||||
|
||||
public string? Nombre { get; set; }
|
||||
|
||||
public string? CorreoElectronico { get; set; }
|
||||
|
||||
public string? Telefono1 { get; set; }
|
||||
|
||||
public string? Telefono2 { get; set; }
|
||||
|
||||
public DateOnly? FechaAlta { get; set; }
|
||||
|
||||
public DateOnly? FechaBaja { get; set; }
|
||||
}
|
||||
99
bdGrupoSanchoToro/db/trabajadores.cs
Normal file
99
bdGrupoSanchoToro/db/trabajadores.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class trabajadores
|
||||
{
|
||||
public int idTrabajador { get; set; }
|
||||
|
||||
public string? CIF { get; set; }
|
||||
|
||||
public string? Nombre { get; set; }
|
||||
|
||||
public string? Apellidos { get; set; }
|
||||
|
||||
public int? idEmpresa { get; set; }
|
||||
|
||||
public int? idPuestoTrabajo { get; set; }
|
||||
|
||||
public int? idSeccion { get; set; }
|
||||
|
||||
public string? NumeroSeguridadSocial { get; set; }
|
||||
|
||||
public string? Login { get; set; }
|
||||
|
||||
public string? Iniciales { get; set; }
|
||||
|
||||
public DateOnly? FechaAntiguedad { get; set; }
|
||||
|
||||
public DateOnly? FechaAlta { get; set; }
|
||||
|
||||
public DateOnly? FechaBaja { get; set; }
|
||||
|
||||
public int? idCausaBaja { get; set; }
|
||||
|
||||
public string? Domicilio { get; set; }
|
||||
|
||||
public int? idCodigoPostal { get; set; }
|
||||
|
||||
public string? Telefono1 { get; set; }
|
||||
|
||||
public string? Telefono2 { get; set; }
|
||||
|
||||
public string? Fax { get; set; }
|
||||
|
||||
public string? CorreoElectronico { get; set; }
|
||||
|
||||
public bool AutorizacionVistoBuenoRespOfertaCliente { get; set; }
|
||||
|
||||
public bool AutorizacionVistoBuenoRespPedidoCliente { get; set; }
|
||||
|
||||
public bool AutorizacionRecepcionDocumentos { get; set; }
|
||||
|
||||
public bool AutorizacionRealizacionProyecto { get; set; }
|
||||
|
||||
public bool AutorizacionAprobacionRiesgo { get; set; }
|
||||
|
||||
public bool AutorizacionNotificacion { get; set; }
|
||||
|
||||
public bool AutorizacionVistoBuenoFacturaCliente { get; set; }
|
||||
|
||||
public bool AutorizacionPedidosAProveedores { get; set; }
|
||||
|
||||
public int? idFormaPago { get; set; }
|
||||
|
||||
public string? IBAN { get; set; }
|
||||
|
||||
public int? idCuentaContable { get; set; }
|
||||
|
||||
public double? Precios { get; set; }
|
||||
|
||||
public string? Situacion { get; set; }
|
||||
|
||||
public string? Observacion { get; set; }
|
||||
|
||||
public int? idCategoriaPrevia { get; set; }
|
||||
|
||||
public bool? RequiereFormato { get; set; }
|
||||
|
||||
public int? idCategoriaCalidad { get; set; }
|
||||
|
||||
public DateOnly? FechaNacimiento { get; set; }
|
||||
|
||||
public DateOnly? FechaRevisionMedicaVigente { get; set; }
|
||||
|
||||
public DateOnly? FechaRevisionMedicaProximo { get; set; }
|
||||
|
||||
public bool NivelBasico { get; set; }
|
||||
|
||||
public bool Altura { get; set; }
|
||||
|
||||
public bool ProtocoloMontaje { get; set; }
|
||||
|
||||
public bool Carretilla { get; set; }
|
||||
|
||||
public bool PrimerosAuxilios { get; set; }
|
||||
}
|
||||
@@ -25,6 +25,10 @@ public partial class usuarios
|
||||
|
||||
public virtual ICollection<albaranes> albaranes { get; set; } = new List<albaranes>();
|
||||
|
||||
public virtual ICollection<asientos> asientos { get; set; } = new List<asientos>();
|
||||
|
||||
public virtual ICollection<asientosmodelos> asientosmodelos { get; set; } = new List<asientosmodelos>();
|
||||
|
||||
public virtual ICollection<autorizacionesusuarios> autorizacionesusuarios { get; set; } = new List<autorizacionesusuarios>();
|
||||
|
||||
public virtual ICollection<conciliacionesbancarias> conciliacionesbancarias { get; set; } = new List<conciliacionesbancarias>();
|
||||
|
||||
21
bdGrupoSanchoToro/db/versiones.cs
Normal file
21
bdGrupoSanchoToro/db/versiones.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace bdGrupoSanchoToro.db;
|
||||
|
||||
[AddINotifyPropertyChangedInterface]
|
||||
public partial class versiones
|
||||
{
|
||||
public int idVersion { get; set; }
|
||||
|
||||
public int idModelo { get; set; }
|
||||
|
||||
public int Version { get; set; }
|
||||
|
||||
public string? Observaciones { get; set; }
|
||||
|
||||
public virtual modelosgruas idModeloNavigation { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<tablaalturas> tablaalturas { get; set; } = new List<tablaalturas>();
|
||||
}
|
||||
@@ -16,8 +16,18 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
public virtual DbSet<almacenes> almacenes { get; set; }
|
||||
|
||||
public virtual DbSet<aplicacionesasientos> aplicacionesasientos { get; set; }
|
||||
|
||||
public virtual DbSet<apuntes> apuntes { get; set; }
|
||||
|
||||
public virtual DbSet<apuntesmodelo> apuntesmodelo { get; set; }
|
||||
|
||||
public virtual DbSet<articulos> articulos { get; set; }
|
||||
|
||||
public virtual DbSet<asientos> asientos { get; set; }
|
||||
|
||||
public virtual DbSet<asientosmodelos> asientosmodelos { get; set; }
|
||||
|
||||
public virtual DbSet<autorizacionesgrupos> autorizacionesgrupos { get; set; }
|
||||
|
||||
public virtual DbSet<autorizacionesusuarios> autorizacionesusuarios { get; set; }
|
||||
@@ -26,12 +36,20 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
public virtual DbSet<cajas> cajas { get; set; }
|
||||
|
||||
public virtual DbSet<celdasinformescontables> celdasinformescontables { get; set; }
|
||||
|
||||
public virtual DbSet<codigospostales> codigospostales { get; set; }
|
||||
|
||||
public virtual DbSet<conceptosapuntes> conceptosapuntes { get; set; }
|
||||
|
||||
public virtual DbSet<conciliacionesbancarias> conciliacionesbancarias { get; set; }
|
||||
|
||||
public virtual DbSet<correos> correos { get; set; }
|
||||
|
||||
public virtual DbSet<cuentas> cuentas { get; set; }
|
||||
|
||||
public virtual DbSet<cuentasceldasinformescontables> cuentasceldasinformescontables { get; set; }
|
||||
|
||||
public virtual DbSet<cuentascorreo> cuentascorreo { get; set; }
|
||||
|
||||
public virtual DbSet<detallepresupuesto> detallepresupuesto { get; set; }
|
||||
@@ -48,6 +66,8 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
public virtual DbSet<documentospresupuestos> documentospresupuestos { get; set; }
|
||||
|
||||
public virtual DbSet<ejercicioscontables> ejercicioscontables { get; set; }
|
||||
|
||||
public virtual DbSet<empresas> empresas { get; set; }
|
||||
|
||||
public virtual DbSet<entidades> entidades { get; set; }
|
||||
@@ -72,16 +92,22 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
public virtual DbSet<fiestas> fiestas { get; set; }
|
||||
|
||||
public virtual DbSet<formulas> formulas { get; set; }
|
||||
public virtual DbSet<gruasparticulares> gruasparticulares { get; set; }
|
||||
|
||||
public virtual DbSet<gruposenumeraciones> gruposenumeraciones { get; set; }
|
||||
|
||||
public virtual DbSet<gruposusuarios> gruposusuarios { get; set; }
|
||||
|
||||
public virtual DbSet<informescontables> informescontables { get; set; }
|
||||
|
||||
public virtual DbSet<logs> logs { get; set; }
|
||||
|
||||
public virtual DbSet<marcasgruas> marcasgruas { get; set; }
|
||||
|
||||
public virtual DbSet<menus> menus { get; set; }
|
||||
|
||||
public virtual DbSet<modelosgruas> modelosgruas { get; set; }
|
||||
|
||||
public virtual DbSet<movimientosbancarios> movimientosbancarios { get; set; }
|
||||
|
||||
public virtual DbSet<movimientoscaja> movimientoscaja { get; set; }
|
||||
@@ -104,26 +130,30 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
public virtual DbSet<stocks> stocks { get; set; }
|
||||
|
||||
public virtual DbSet<tablaalturas> tablaalturas { get; set; }
|
||||
|
||||
public virtual DbSet<tablaplumas> tablaplumas { get; set; }
|
||||
|
||||
public virtual DbSet<tablas> tablas { get; set; }
|
||||
|
||||
public virtual DbSet<trabajador> trabajador { get; set; }
|
||||
public virtual DbSet<trabajadores> trabajadores { get; set; }
|
||||
|
||||
public virtual DbSet<usuarios> usuarios { get; set; }
|
||||
|
||||
public virtual DbSet<v_albaranesextendidos> v_albaranesextendidos { get; set; }
|
||||
|
||||
public virtual DbSet<versiones> versiones { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.UseCollation("utf8mb4_es_trad_0900_ai_ci")
|
||||
.UseCollation("utf8mb4_0900_ai_ci")
|
||||
.HasCharSet("utf8mb4");
|
||||
|
||||
modelBuilder.Entity<albaranes>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idAlbaran).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idAlmacenOrigen, "albaranes_almacenes01_idx");
|
||||
|
||||
entity.HasIndex(e => e.idAlmacenDestino, "albaranes_almacenes02_idx");
|
||||
@@ -231,8 +261,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idAlmacen).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idEmpresa, "almacenes_empresas_idx");
|
||||
|
||||
entity.HasIndex(e => e.CodigoMunicipio, "almacenes_municipios_idx");
|
||||
@@ -275,12 +303,79 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("almacenes_empresas");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<aplicacionesasientos>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idAplicacionAsiento).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idAsiento, "asientos_idx");
|
||||
|
||||
entity.HasOne(d => d.idAsientoNavigation).WithMany(p => p.aplicacionesasientos)
|
||||
.HasForeignKey(d => d.idAsiento)
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.HasConstraintName("asientos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<apuntes>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idApunte).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idAsiento, "apuntes_asientos_idx");
|
||||
|
||||
entity.HasIndex(e => e.idConcepto, "apuntes_conceptosapuntes_idx");
|
||||
|
||||
entity.HasIndex(e => e.idConciliacion, "apuntes_conciliacionesbancarias_idx");
|
||||
|
||||
entity.HasIndex(e => e.idCuenta, "apuntes_cuentas_idx");
|
||||
|
||||
entity.Property(e => e.Concepto).HasMaxLength(200);
|
||||
entity.Property(e => e.FechaPunteo).HasColumnType("datetime");
|
||||
entity.Property(e => e.NumeroDocumento).HasMaxLength(30);
|
||||
|
||||
entity.HasOne(d => d.idAsientoNavigation).WithMany(p => p.apuntes)
|
||||
.HasForeignKey(d => d.idAsiento)
|
||||
.HasConstraintName("apuntes_asientos");
|
||||
|
||||
entity.HasOne(d => d.idConceptoNavigation).WithMany(p => p.apuntes)
|
||||
.HasForeignKey(d => d.idConcepto)
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("apuntes_conceptosapuntes");
|
||||
|
||||
entity.HasOne(d => d.idConciliacionNavigation).WithMany(p => p.apuntes)
|
||||
.HasForeignKey(d => d.idConciliacion)
|
||||
.HasConstraintName("apuntes_conciliacionesbancarias");
|
||||
|
||||
entity.HasOne(d => d.idCuentaNavigation).WithMany(p => p.apuntes)
|
||||
.HasForeignKey(d => d.idCuenta)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("apuntes_cuentas");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<apuntesmodelo>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idApunteModelo).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idAsientoModelo, "apuntesmodelos_asientosmodelos_idx");
|
||||
|
||||
entity.HasIndex(e => e.idConcepto, "apuntesmodelos_conceptosapuntes_idx");
|
||||
|
||||
entity.Property(e => e.Concepto).HasMaxLength(200);
|
||||
entity.Property(e => e.NumeroCuenta).HasMaxLength(10);
|
||||
entity.Property(e => e.NumeroDocumento).HasMaxLength(30);
|
||||
|
||||
entity.HasOne(d => d.idAsientoModeloNavigation).WithMany(p => p.apuntesmodelo)
|
||||
.HasForeignKey(d => d.idAsientoModelo)
|
||||
.HasConstraintName("apuntesmodelos_asientosmodelos");
|
||||
|
||||
entity.HasOne(d => d.idConceptoNavigation).WithMany(p => p.apuntesmodelo)
|
||||
.HasForeignKey(d => d.idConcepto)
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("apuntesmodelos_conceptosapuntes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<articulos>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idArticulo).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idFichero, "articulos_ficheros_idx");
|
||||
|
||||
entity.HasIndex(e => new { e.idProducto, e.CodigoArticulo }, "articulos_productos_codigoarticulo").IsUnique();
|
||||
@@ -326,12 +421,57 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("articulos_proveedores");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<asientos>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idAsiento).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idAsientoModelo, "asientos_asientosmodelo_idx");
|
||||
|
||||
entity.HasIndex(e => e.idEjercicio, "asientos_ejercicioscontables_idx");
|
||||
|
||||
entity.HasIndex(e => e.idUsuario, "asientos_usuarios_idx");
|
||||
|
||||
entity.Property(e => e.FechaPunteo).HasColumnType("datetime");
|
||||
|
||||
entity.HasOne(d => d.idAsientoModeloNavigation).WithMany(p => p.asientos)
|
||||
.HasForeignKey(d => d.idAsientoModelo)
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("asientos_asientosmodelo");
|
||||
|
||||
entity.HasOne(d => d.idEjercicioNavigation).WithMany(p => p.asientos)
|
||||
.HasForeignKey(d => d.idEjercicio)
|
||||
.HasConstraintName("asientos_ejercicioscontables");
|
||||
|
||||
entity.HasOne(d => d.idUsuarioNavigation).WithMany(p => p.asientos)
|
||||
.HasForeignKey(d => d.idUsuario)
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("asientos_usuarios");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<asientosmodelos>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idAsientoModelo).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idUsuario, "asientosmodelos_usuarios_idx");
|
||||
|
||||
entity.Property(e => e.Codigo).HasMaxLength(6);
|
||||
entity.Property(e => e.Descripcion).HasMaxLength(100);
|
||||
entity.Property(e => e.FechaIntroduccion).HasColumnType("datetime");
|
||||
|
||||
entity.HasOne(d => d.idUsuarioNavigation).WithMany(p => p.asientosmodelos)
|
||||
.HasForeignKey(d => d.idUsuario)
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("asientosmodelos_usuarios");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<autorizacionesgrupos>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idAutorizaciongrupo).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idGrupo, "autorizacionesgrupos_gruposusuarios_idx");
|
||||
|
||||
entity.HasIndex(e => new { e.idPermiso, e.idGrupo }, "autorizacionesgrupos_permisos_idx").IsUnique();
|
||||
@@ -351,8 +491,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idAutorizaciones).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idUsuario, "autorizaciones_grupos_idx");
|
||||
|
||||
entity.HasIndex(e => new { e.idPermiso, e.idUsuario }, "autorizacionesusuarios_permisos_idx").IsUnique();
|
||||
@@ -371,8 +509,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.Codigo).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.Property(e => e.Codigo)
|
||||
.HasMaxLength(4)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
@@ -391,8 +527,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idCaja).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idEmpresa, "cajas_empresas_idx");
|
||||
|
||||
entity.HasIndex(e => e.idPermiso, "cajas_permisos_idx");
|
||||
@@ -422,12 +556,25 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("cajas_permisos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<celdasinformescontables>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idCelda).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idInformeContable, "celdasinformescontables_informescontables_idx");
|
||||
|
||||
entity.Property(e => e.Columna).HasMaxLength(4);
|
||||
entity.Property(e => e.NombreCampo).HasMaxLength(45);
|
||||
entity.Property(e => e.Observaciones).HasMaxLength(100);
|
||||
|
||||
entity.HasOne(d => d.idInformeContableNavigation).WithMany(p => p.celdasinformescontables)
|
||||
.HasForeignKey(d => d.idInformeContable)
|
||||
.HasConstraintName("celdasinformescontables_informescontables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<codigospostales>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idCodigoPostal).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => new { e.CodigoPostal, e.CodigoMunicipio }, "codigopostal_codigomunicipio").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.CodigoMunicipio, "codigospostales_municipios_idx");
|
||||
@@ -450,12 +597,20 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("cp_municipios");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<conceptosapuntes>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idConcepto).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.Property(e => e.Codigo).HasMaxLength(10);
|
||||
entity.Property(e => e.Concepto).HasMaxLength(200);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<conciliacionesbancarias>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idConciliacion).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idCaja, "conciliacionesbancarias_cajas_idx");
|
||||
|
||||
entity.HasIndex(e => e.idUsuario, "conciliacionesbancarias_usuarios_idx");
|
||||
@@ -475,8 +630,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idcorreo).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.FechaAnulacion, "FechaAnulacion");
|
||||
|
||||
entity.HasIndex(e => e.FechaAvisoError, "FechaAvisoError");
|
||||
@@ -562,13 +715,49 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("correos_cuentas");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<cuentas>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idCuenta).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idEjercicio, "cuentas_ejercicioscontables_idx");
|
||||
|
||||
entity.HasIndex(e => e.idEmpresaAmortizacion, "cuentas_enumeraciones_01_Empresa_idx");
|
||||
|
||||
entity.Property(e => e.Denominacion)
|
||||
.HasMaxLength(150)
|
||||
.HasDefaultValueSql("'0'");
|
||||
entity.Property(e => e.Mote).HasMaxLength(40);
|
||||
entity.Property(e => e.NumeroCuenta).HasMaxLength(10);
|
||||
entity.Property(e => e.Observaciones).HasMaxLength(200);
|
||||
|
||||
entity.HasOne(d => d.idEjercicioNavigation).WithMany(p => p.cuentas)
|
||||
.HasForeignKey(d => d.idEjercicio)
|
||||
.HasConstraintName("cuentas_ejercicioscontables");
|
||||
|
||||
entity.HasOne(d => d.idEmpresaAmortizacionNavigation).WithMany(p => p.cuentas)
|
||||
.HasForeignKey(d => d.idEmpresaAmortizacion)
|
||||
.HasConstraintName("cuentas_enumeraciones_01_Empresa");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<cuentasceldasinformescontables>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idCuenta).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idCelda, "cuentasceldasinformescontables_celdasinformescontables_idx");
|
||||
|
||||
entity.Property(e => e.NumeroCuenta).HasMaxLength(8);
|
||||
|
||||
entity.HasOne(d => d.idCeldaNavigation).WithMany(p => p.cuentasceldasinformescontables)
|
||||
.HasForeignKey(d => d.idCelda)
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.HasConstraintName("cuentasceldasinformescontables_celdasinformescontables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<cuentascorreo>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idCuenta).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
entity.HasIndex(e => new { e.Codigo, e.idEmpresa }, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idEmpresa, "cuentascorreos_empresas_idx");
|
||||
|
||||
@@ -608,8 +797,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idDetallePresupuesto).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idPresupuesto, "detallepresupuesto_Presupuestos_idx");
|
||||
|
||||
entity.HasIndex(e => e.idArticulo, "detallepresupuesto_articulos");
|
||||
@@ -641,8 +828,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idDetalle).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idAlbaran, "detallesalbaranes_albaranes_idx");
|
||||
|
||||
entity.HasIndex(e => e.idArticulo, "detallesalbaranes_articulos_idx");
|
||||
@@ -668,8 +853,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idDetalle).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idDetallePresupuesto, "detallesfacturas_detallespresupuestos_idx");
|
||||
|
||||
entity.HasIndex(e => e.idFactura, "detallesfacturas_facturas_idx");
|
||||
@@ -714,8 +897,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idDetalle).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idFactura, "detallesfacturasrecibidas_facturas_idx");
|
||||
|
||||
entity.HasIndex(e => e.idProducto, "detallesfacturasrecibidas_productos_idx");
|
||||
@@ -746,8 +927,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idDocumento).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idFactura, "documentosfacturas_facturas_idx");
|
||||
|
||||
entity.HasIndex(e => e.idFichero, "documentosfacturas_ficheros_idx");
|
||||
@@ -780,8 +959,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idDocumento).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idFactura, "documentosfacturasrecibidas_facturasrecibidas_idx");
|
||||
|
||||
entity.HasIndex(e => e.idFichero, "documentosfacturasrecibidas_ficheros_idx");
|
||||
@@ -814,8 +991,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idDocumento).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idTipoDocumento, "documentosprespuestos_idx");
|
||||
|
||||
entity.HasIndex(e => e.idPresupuesto, "documentosprespuestos_presupuestos_idx");
|
||||
@@ -850,11 +1025,27 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("documentospresupuestos_usuarios");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ejercicioscontables>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idEjercicio).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idEmpresa, "ejercicioscontables_empresascontables_idx");
|
||||
|
||||
entity.Property(e => e.Descripcion).HasMaxLength(40);
|
||||
entity.Property(e => e.NivelesCuentas).HasMaxLength(20);
|
||||
|
||||
entity.HasOne(d => d.idEmpresaNavigation).WithMany(p => p.ejercicioscontables)
|
||||
.HasForeignKey(d => d.idEmpresa)
|
||||
.HasConstraintName("ejercicioscontables_empresascontables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<empresas>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idEmpresa).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.RazonSocial, "RazonSocial_UNIQUE").IsUnique();
|
||||
|
||||
@@ -866,6 +1057,7 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasMaxLength(16)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
.HasCharSet("latin1");
|
||||
entity.Property(e => e.Codigo).HasMaxLength(2);
|
||||
entity.Property(e => e.Domicilio)
|
||||
.HasMaxLength(100)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
@@ -894,8 +1086,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idEntidad).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idUsuarioCreador, "entidades_01_usuarios_idx");
|
||||
|
||||
entity.HasIndex(e => e.idUsuarioModificador, "entidades_02_usuarios_idx");
|
||||
@@ -1002,8 +1192,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idEnumeracion).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idGrupoEnumeracion, "enumeraciones_gruposenumeraciones_idx");
|
||||
@@ -1049,8 +1237,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idEvento).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => new { e.idEntidad, e.Descripcion }, "eventos_descripcion_unique").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idEntidad, "obras_entidades_idx");
|
||||
@@ -1115,8 +1301,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idExpediente).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idEntidad, "expedientes_entidades_idx");
|
||||
|
||||
entity.HasIndex(e => e.idFichero, "expedientesentidades_ficheros_idx");
|
||||
@@ -1149,8 +1333,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idExtracto).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idCaja, "extractosbancarios_cajas_idx");
|
||||
|
||||
entity.HasIndex(e => e.idUsuario, "extractosbancarios_usuarios_idx");
|
||||
@@ -1171,8 +1353,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idFactura).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idDatosClienteOriginal, "facturas_DatosOriginales_idx");
|
||||
|
||||
entity.HasIndex(e => e.idCliente, "facturas_clientes_idx");
|
||||
@@ -1262,8 +1442,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idFactura).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idDatosProveedorOriginal, "facturasrecibidas_DatosOriginales_idx");
|
||||
|
||||
entity.HasIndex(e => e.idCategoria, "facturasrecibidas_categorias_idx");
|
||||
@@ -1344,8 +1522,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idFichero).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion");
|
||||
|
||||
entity.HasIndex(e => e.Fecha, "Fecha");
|
||||
@@ -1378,8 +1554,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idFicheroAdjunto).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idCorreo, "ficherosadjuntos_correos_idx");
|
||||
|
||||
entity.HasIndex(e => e.idFichero, "ficherosadjuntos_ficheros_idx");
|
||||
@@ -1397,8 +1571,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idFicheroConfiguracion).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => new { e.Codigo, e.idUsuario, e.Descripcion }, "Codigo").IsUnique();
|
||||
|
||||
entity.Property(e => e.Codigo)
|
||||
@@ -1416,8 +1588,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idFiesta).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Fecha, "Fecha_UNIQUE").IsUnique();
|
||||
|
||||
entity.Property(e => e.Descripcion)
|
||||
@@ -1426,36 +1596,24 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasCharSet("latin1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<formulas>(entity =>
|
||||
modelBuilder.Entity<gruasparticulares>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idFormula).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
entity.HasKey(e => e.idArticulo).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
entity.Property(e => e.idArticulo).ValueGeneratedNever();
|
||||
entity.Property(e => e.Codigo).HasMaxLength(45);
|
||||
|
||||
entity.Property(e => e.Codigo)
|
||||
.HasMaxLength(40)
|
||||
.UseCollation("utf8mb3_general_ci")
|
||||
.HasCharSet("utf8mb3");
|
||||
entity.Property(e => e.Descripcion)
|
||||
.HasMaxLength(100)
|
||||
.UseCollation("utf8mb3_general_ci")
|
||||
.HasCharSet("utf8mb3");
|
||||
entity.Property(e => e.Formula)
|
||||
.HasMaxLength(1024)
|
||||
.UseCollation("utf8mb3_general_ci")
|
||||
.HasCharSet("utf8mb3");
|
||||
entity.HasOne(d => d.idArticuloNavigation).WithOne(p => p.gruasparticulares)
|
||||
.HasForeignKey<gruasparticulares>(d => d.idArticulo)
|
||||
.HasConstraintName("gruasparticulares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<gruposenumeraciones>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idGrupoEnumeracion).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.Property(e => e.Descripcion)
|
||||
.HasMaxLength(60)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
@@ -1470,8 +1628,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idGrupo).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
|
||||
entity.Property(e => e.Descripcion)
|
||||
@@ -1480,12 +1636,29 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasCharSet("latin1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<informescontables>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idInforme).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idFichero, "informescontables_ficheros_idx");
|
||||
|
||||
entity.Property(e => e.Codigo).HasMaxLength(10);
|
||||
entity.Property(e => e.Descripcion).HasMaxLength(100);
|
||||
|
||||
entity.HasOne(d => d.idFicheroNavigation).WithMany(p => p.informescontables)
|
||||
.HasForeignKey(d => d.idFichero)
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("informescontables_ficheros");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<logs>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idLog).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => new { e.id, e.Aplicacion }, "id");
|
||||
|
||||
entity.HasIndex(e => e.idLog, "idLog").IsUnique();
|
||||
@@ -1519,12 +1692,19 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasCharSet("utf8mb3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<marcasgruas>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idMarca).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.Marca, "Marca_UNIQUE").IsUnique();
|
||||
|
||||
entity.Property(e => e.Marca).HasMaxLength(45);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<menus>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idMenus).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idPermiso, "menus_permisos_idx");
|
||||
|
||||
entity.Property(e => e.Accion)
|
||||
@@ -1546,12 +1726,35 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("menus_permisos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<modelosgruas>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idProducto).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idMarca, "FK_modelosgruas_marcas_idx");
|
||||
|
||||
entity.HasIndex(e => new { e.Modelo, e.idMarca }, "MarcaModelo").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idProducto, "idProducto_UNIQUE").IsUnique();
|
||||
|
||||
entity.Property(e => e.idProducto).ValueGeneratedNever();
|
||||
entity.Property(e => e.FechaAlta).HasColumnType("datetime");
|
||||
entity.Property(e => e.FechaBaja).HasColumnType("datetime");
|
||||
entity.Property(e => e.Modelo).HasMaxLength(50);
|
||||
|
||||
entity.HasOne(d => d.idMarcaNavigation).WithMany(p => p.modelosgruas)
|
||||
.HasForeignKey(d => d.idMarca)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_modelosgruas_marcas");
|
||||
|
||||
entity.HasOne(d => d.idProductoNavigation).WithOne(p => p.modelosgruas)
|
||||
.HasForeignKey<modelosgruas>(d => d.idProducto)
|
||||
.HasConstraintName("FK_modelosgruas_productos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<movimientosbancarios>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idMovimientoBancario).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idConciliacion, "movimientosbancarios_conciliaciones_idx");
|
||||
|
||||
entity.HasIndex(e => e.idExtractoBancario, "movimientosbancarios_extractosbancarios_idx");
|
||||
@@ -1591,8 +1794,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idMovimiento).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.FechaSupervision, "FechaSupervision");
|
||||
|
||||
entity.HasIndex(e => e.NumeroRecibo, "NumeroRecibo_UNIQUE").IsUnique();
|
||||
@@ -1668,8 +1869,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.CodigoMunicipio).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.CodigoMunicipio, "CodigoMunicipio_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.CodigoProvincia, "municipios_provincias_idx");
|
||||
@@ -1701,8 +1900,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idPermiso).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.Property(e => e.CodigoPermiso)
|
||||
.HasMaxLength(50)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
@@ -1717,8 +1914,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idPlantilla).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "DescripcionPlantilla_UNIQUE").IsUnique();
|
||||
@@ -1772,8 +1967,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idPresupuesto).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idDatosClienteOriginal, "presupuestos_DatosOriginales_idx");
|
||||
|
||||
entity.HasIndex(e => e.idCliente, "presupuestos_clientes_idx");
|
||||
@@ -1812,8 +2005,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idProceso).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idTipo, "procesos_01_Tipo_idx");
|
||||
|
||||
entity.HasIndex(e => e.idSubtipo, "procesos_02_SubTipo_idx");
|
||||
@@ -1860,10 +2051,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idProducto).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idUsuarioCreador, "productos_01_usuarios_idx");
|
||||
@@ -1872,19 +2059,30 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
entity.HasIndex(e => e.idEmpresa, "productos_empresas_idx");
|
||||
|
||||
entity.Property(e => e.Codigo)
|
||||
.HasMaxLength(20)
|
||||
.UseCollation("utf8mb3_general_ci")
|
||||
.HasCharSet("utf8mb3");
|
||||
entity.HasIndex(e => e.idFamilia, "productos_familias_idx");
|
||||
|
||||
entity.Property(e => e.CodigoBarras).HasMaxLength(16);
|
||||
entity.Property(e => e.ControlarEnAlbaran).HasMaxLength(2);
|
||||
entity.Property(e => e.CorrespondenciaPatas).HasMaxLength(45);
|
||||
entity.Property(e => e.Descripcion)
|
||||
.HasMaxLength(100)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
.HasCharSet("latin1");
|
||||
entity.Property(e => e.DescripcionAbreviada).HasMaxLength(45);
|
||||
entity.Property(e => e.FechaBaja).HasColumnType("datetime");
|
||||
entity.Property(e => e.Marca).HasMaxLength(45);
|
||||
entity.Property(e => e.Modelo).HasMaxLength(45);
|
||||
entity.Property(e => e.ModeloGruaPatas).HasMaxLength(45);
|
||||
entity.Property(e => e.ModelosPatas).HasMaxLength(45);
|
||||
entity.Property(e => e.NumeroSerie).HasMaxLength(2);
|
||||
entity.Property(e => e.Observaciones)
|
||||
.HasMaxLength(300)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
.HasCharSet("latin1");
|
||||
entity.Property(e => e.PrefijoNumeroSerie).HasMaxLength(8);
|
||||
entity.Property(e => e.ReferenciaFabrica).HasMaxLength(45);
|
||||
entity.Property(e => e.StockMinimo).HasMaxLength(45);
|
||||
entity.Property(e => e.Ubicacion).HasMaxLength(45);
|
||||
|
||||
entity.HasOne(d => d.idEmpresaNavigation).WithMany(p => p.productos)
|
||||
.HasForeignKey(d => d.idEmpresa)
|
||||
@@ -1905,8 +2103,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.CodigoProvincia).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.Property(e => e.CodigoProvincia)
|
||||
.HasMaxLength(2)
|
||||
.UseCollation("utf8mb3_general_ci")
|
||||
@@ -1921,8 +2117,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idSerieFactura).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.idEmpresa, "seriesfacturas_empresas_idx");
|
||||
|
||||
entity.HasIndex(e => new { e.Serie, e.idEmpresa }, "seriesfacturas_empresas_uq").IsUnique();
|
||||
@@ -1947,8 +2141,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idStock).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => new { e.idAlmacen, e.idProducto }, "stocks_almacenes_productos_unq").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idProducto, "stocks_productos_idx");
|
||||
@@ -1964,12 +2156,43 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("stocks_productos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<tablaalturas>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idAltura).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idModelo, "FK_tablaalturas_modelos_idx");
|
||||
|
||||
entity.HasIndex(e => e.idVersion, "FK_tablaalturas_versiones_idx");
|
||||
|
||||
entity.Property(e => e.Observaciones).HasMaxLength(50);
|
||||
|
||||
entity.HasOne(d => d.idModeloNavigation).WithMany(p => p.tablaalturas)
|
||||
.HasForeignKey(d => d.idModelo)
|
||||
.HasConstraintName("FK_tablaalturas_modelos");
|
||||
|
||||
entity.HasOne(d => d.idVersionNavigation).WithMany(p => p.tablaalturas)
|
||||
.HasForeignKey(d => d.idVersion)
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.HasConstraintName("FK_tablaalturas_versiones");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<tablaplumas>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idPluma).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.idModelo, "FK_tablaplumas_modelosgruas_idx");
|
||||
|
||||
entity.Property(e => e.Observaciones).HasMaxLength(50);
|
||||
|
||||
entity.HasOne(d => d.idModeloNavigation).WithMany(p => p.tablaplumas)
|
||||
.HasForeignKey(d => d.idModelo)
|
||||
.HasConstraintName("FK_tablaplumas_modelosgruas");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<tablas>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idTabla).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
@@ -1984,28 +2207,37 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasCharSet("utf8mb3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<trabajador>(entity =>
|
||||
modelBuilder.Entity<trabajadores>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idTrabajador).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
entity.HasIndex(e => e.RequiereFormato, "RequiereFormato_UNIQUE").IsUnique();
|
||||
|
||||
entity.Property(e => e.Apellidos)
|
||||
.HasMaxLength(100)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
.HasCharSet("latin1");
|
||||
entity.Property(e => e.CIF)
|
||||
.HasMaxLength(20)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
.HasCharSet("latin1");
|
||||
entity.Property(e => e.CorreoElectronico)
|
||||
.HasMaxLength(60)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
.HasCharSet("latin1");
|
||||
entity.Property(e => e.DocumentoIdentidad)
|
||||
.HasMaxLength(20)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
.HasCharSet("latin1");
|
||||
entity.Property(e => e.Domicilio).HasMaxLength(100);
|
||||
entity.Property(e => e.Fax).HasMaxLength(20);
|
||||
entity.Property(e => e.IBAN).HasMaxLength(35);
|
||||
entity.Property(e => e.Iniciales).HasMaxLength(2);
|
||||
entity.Property(e => e.Login).HasMaxLength(45);
|
||||
entity.Property(e => e.Nombre)
|
||||
.HasMaxLength(45)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
.HasCharSet("latin1");
|
||||
entity.Property(e => e.NumeroSeguridadSocial).HasMaxLength(14);
|
||||
entity.Property(e => e.Observacion).HasMaxLength(100);
|
||||
entity.Property(e => e.RequiereFormato).HasDefaultValueSql("b'0'");
|
||||
entity.Property(e => e.Situacion).HasMaxLength(2);
|
||||
entity.Property(e => e.Telefono1)
|
||||
.HasMaxLength(20)
|
||||
.UseCollation("latin1_swedish_ci")
|
||||
@@ -2020,8 +2252,6 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idUsuario).HasName("PRIMARY");
|
||||
|
||||
entity.UseCollation("utf8mb4_0900_ai_ci");
|
||||
|
||||
entity.HasIndex(e => e.Usuario, "Usuario_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idTema, "Usuarios_Temas_idx");
|
||||
@@ -2179,6 +2409,22 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
entity.Property(e => e.idEvento).HasDefaultValueSql("'0'");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<versiones>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idVersion).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => new { e.idModelo, e.Version }, "modelo_version").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idModelo, "versiones_modelosgruas_idx");
|
||||
|
||||
entity.Property(e => e.idVersion).ValueGeneratedNever();
|
||||
entity.Property(e => e.Observaciones).HasMaxLength(50);
|
||||
|
||||
entity.HasOne(d => d.idModeloNavigation).WithMany(p => p.versiones)
|
||||
.HasForeignKey(d => d.idModelo)
|
||||
.HasConstraintName("versiones_modelosgruas");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//using bdGrupoSanchoToro.CompiledModels;
|
||||
using bdGrupoSanchoToro.db;
|
||||
using bdGrupoSanchoToro.dbcontext;
|
||||
using bdGrupoSanchoToro.dbcontext;
|
||||
using Castle.Components.DictionaryAdapter.Xml;
|
||||
using Microsoft.AspNetCore.Mvc.Formatters;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"ContextNamespace": null,
|
||||
"FilterSchemas": false,
|
||||
"IncludeConnectionString": false,
|
||||
"MinimumProductVersion": "2.6.1186",
|
||||
"ModelNamespace": null,
|
||||
"OutputContextPath": "dbcontext",
|
||||
"OutputPath": "db",
|
||||
@@ -22,10 +23,30 @@
|
||||
"Name": "almacenes",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "aplicacionesasientos",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "apuntes",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "apuntesmodelo",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "articulos",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "asientos",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "asientosmodelos",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "autorizacionesgrupos",
|
||||
"ObjectType": 0
|
||||
@@ -42,10 +63,18 @@
|
||||
"Name": "cajas",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "celdasinformescontables",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "codigospostales",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "conceptosapuntes",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "conciliacionesbancarias",
|
||||
"ObjectType": 0
|
||||
@@ -54,6 +83,14 @@
|
||||
"Name": "correos",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "cuentas",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "cuentasceldasinformescontables",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "cuentascorreo",
|
||||
"ObjectType": 0
|
||||
@@ -86,6 +123,10 @@
|
||||
"Name": "documentospresupuestos",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "ejercicioscontables",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "empresas",
|
||||
"ObjectType": 0
|
||||
@@ -135,7 +176,7 @@
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "formulas",
|
||||
"Name": "gruasparticulares",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
@@ -146,14 +187,26 @@
|
||||
"Name": "gruposusuarios",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "informescontables",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "logs",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "marcasgruas",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "menus",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "modelosgruas",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "movimientosbancarios",
|
||||
"ObjectType": 0
|
||||
@@ -198,18 +251,30 @@
|
||||
"Name": "stocks",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "tablaalturas",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "tablaplumas",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "tablas",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "trabajador",
|
||||
"Name": "trabajadores",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "usuarios",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "versiones",
|
||||
"ObjectType": 0
|
||||
},
|
||||
{
|
||||
"Name": "v_albaranesextendidos",
|
||||
"ObjectType": 3
|
||||
|
||||
Reference in New Issue
Block a user