se cambiaron restricciones
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -6,7 +6,7 @@ export class Uso {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_tipo_uso: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar', length: 100 })
|
||||
tipo_uso: string;
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.tipoUso)
|
||||
equipo: Equipo[];
|
||||
@@ -17,7 +17,7 @@ export class Marca {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_marca: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar', length: 100 })
|
||||
marca: string;
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.marca)
|
||||
@@ -29,7 +29,7 @@ export class Estado {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_estado: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar', length: 100 })
|
||||
estado: string;
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.estado)
|
||||
@@ -41,7 +41,7 @@ export class Adscripcion {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_adscripcion: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar', length: 300 })
|
||||
adscripcion: string;
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.adscripcion)
|
||||
@@ -53,7 +53,7 @@ export class TipoEquipo {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_tipo_de_equipo: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar', length: 200 })
|
||||
tipo_equipo: string;
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.tipoEquipo)
|
||||
@@ -65,7 +65,7 @@ export class SistemaOperativo {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_sistema_operativo: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar', length: 200 })
|
||||
sistema_operativo: string;
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.sistemaOperativo)
|
||||
@@ -77,7 +77,7 @@ export class Procesador {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_procesador: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar', length: 200 })
|
||||
procesador: string;
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.procesador)
|
||||
@@ -89,7 +89,7 @@ export class Periferico {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_periferico: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar', length: 100 })
|
||||
periferico: string;
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.periferico)
|
||||
|
||||
@@ -24,22 +24,22 @@ export class Equipo {
|
||||
id_equipo: number;
|
||||
//checar bien aqui si estoy bien
|
||||
|
||||
@Column({ length: 200, nullable: true })
|
||||
@Column({ type: 'varchar', length: 200, nullable: true })
|
||||
inventario: string;
|
||||
|
||||
@Column({ length: 200, nullable: true })
|
||||
@Column({ type: 'varchar', length: 200, nullable: true })
|
||||
serie: string;
|
||||
|
||||
@Column({ length: 200, nullable: true })
|
||||
@Column({ type: 'varchar', length: 200, nullable: true })
|
||||
lugar: string;
|
||||
|
||||
@Column({ name: 'fecha_factura' })
|
||||
fechaFactura: Date;
|
||||
|
||||
@Column({ length: 200, nullable: true })
|
||||
@Column({ type: 'varchar', length: 200, nullable: true })
|
||||
antiguedad: string;
|
||||
|
||||
@Column({ length: 200, nullable: true })
|
||||
@Column({ type: 'varchar', length: 200, nullable: true })
|
||||
modelo: string;
|
||||
|
||||
//Relaciones
|
||||
|
||||
@@ -25,6 +25,6 @@ export class Movimiento {
|
||||
@Column({ name: 'fecha_movimiento' })
|
||||
fechaMovimiento: Date;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
@Column({ type: 'varchar', length: 100, nullable: true })
|
||||
observaciones: string;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export class Tipo_Usuario {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_tipo_usuario: number;
|
||||
|
||||
@Column({ length: 50, nullable: true })
|
||||
@Column({ type: 'varchar', length: 50, nullable: true })
|
||||
tipo_usuario: string;
|
||||
|
||||
@OneToMany(() => Usuario, (usuarios) => usuarios.tipoUsuario)
|
||||
@@ -25,10 +25,10 @@ export class Usuario {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_usuario: number;
|
||||
|
||||
@Column({ length: 100, nullable: true })
|
||||
@Column({ type: 'varchar', length: 100, nullable: true })
|
||||
nombre: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@Column({ type: 'varchar', length: 100, nullable: true })
|
||||
contraseña: string;
|
||||
|
||||
@JoinColumn({ name: 'id_tipo_usuario' })
|
||||
|
||||
Reference in New Issue
Block a user