fixed errors

This commit is contained in:
2024-06-18 13:27:10 -06:00
parent 4294c50e6a
commit ea0c8644b7
11 changed files with 23 additions and 24 deletions
+3 -4
View File
@@ -16,10 +16,10 @@ import { AsignaturaCarreraProfesor } from '../../asignatura_carrera_profesor/ent
@Entity()
export class Profesor {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int',nullable: false })
id_profesor: number;
@Column({ type: 'int', length: 11, nullable: false })
@Column({ type: 'int',nullable: false })
id_usuario: number;
@Column({ type: 'varchar', length: 10, nullable: true })
@@ -71,9 +71,8 @@ export class Profesor {
mostrar: boolean;
@Column({
type: 'timestamp',
type: 'datetime',
nullable: false,
default: () => 'CURRENT_DATETIME',
})
fecha_alta: Date;
@@ -2,7 +2,7 @@ import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm';
@Entity()
export class Adscripcion {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_adscripcion: number;
@Column({ type: 'varchar', length: 150, nullable: false })
+8 -8
View File
@@ -6,8 +6,6 @@ import { AuthModule } from './auth/auth.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UsersModule } from './users/users.module';
import { User } from './users/entities/user.entity';
import { ProfesorModule } from './profesor/profesor.module';
import { Profesor } from './profesor/entities/profesor.entity';
import { Adscripcion } from './adscripcion/entities/adscripcion.entity';
import { Asignatura } from './asignatura/entities/asignatura.entity';
import { AsignaturaCarreraProfesor } from './asignatura_carrera_profesor/entities/asignatura_carrera_profesor.entity';
@@ -18,6 +16,8 @@ import { Edificio } from './edificio/entities/edificio.entity';
import { LineasInvestigacion } from './lineas_investigacion/entities/lineas_investigacion.entity';
import { ProyectosAcademicos } from './proyectos_academicos/entities/proyectos_academicos.entity';
import { TipoUsuario } from './tipo_usuario/entities/tipo_usuario.entity';
import { ProfesorModule } from './Profesor/profesor.module';
import { Profesor } from './Profesor/entities/profesor.entity';
@Module({
imports: [
@@ -30,13 +30,13 @@ import { TipoUsuario } from './tipo_usuario/entities/tipo_usuario.entity';
TypeOrmModule.forRootAsync({
imports: [ConfigModule, AuthModule, UsersModule],
inject: [ConfigService],
useFactory: async (configservice: ConfigService) => ({
useFactory: async (configService: ConfigService) => ({
type: 'mariadb',
host: configservice.get('DB_HOST'),
port: configservice.get('DB_PORT'),
username: configservice.get('DB_USER'),
password: configservice.get('DB_PASSWORD'),
database: configservice.get('DB_DATABASE'),
host: configService.get('DB_HOST'),
port: configService.get('DB_PORT'),
username: configService.get('DB_USER'),
password: configService.get('DB_PASSWORD'),
database: configService.get('DB_DATABASE'),
entities: [
User,
Profesor,
@@ -1,17 +1,17 @@
import { Entity, PrimaryColumn, Column, ManyToOne, JoinColumn } from 'typeorm';
import { Profesor } from "../../Profesor/entities/profesor.entity";
import { Asignatura } from "../../asignatura/entities/asignatura.entity";
import { Carrera } from "../../Carrera/entities/carrera.entity";
import { Carrera } from 'src/carrera/entities/carrera.entity';
@Entity()
export class AsignaturaCarreraProfesor {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_profesor: number;
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_carrera: number;
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_asignatura: number;
@Column({ type: 'varchar', length: 150, nullable: false })
+1 -1
View File
@@ -3,7 +3,7 @@ import { Profesor } from '../../Profesor/entities/profesor.entity';
@Entity()
export class Categoria {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int',nullable: false })
id_categoria: number;
@Column({ type: 'varchar', length: 256, nullable: false })
@@ -3,7 +3,7 @@ import { Profesor } from '../../Profesor/entities/profesor.entity';
@Entity({ name: 'datos_academicos' })
export class DatosAcademicos {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_datos: number;
@Column({ type: 'int', nullable: false })
+1 -1
View File
@@ -3,7 +3,7 @@ import { Profesor } from "../../Profesor/entities/profesor.entity";
@Entity()
export class Edificio {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_edificio: number;
@Column({ type: 'varchar', length: 256, nullable: false })
@@ -4,7 +4,7 @@ import { Profesor } from "../../Profesor/entities/profesor.entity";
@Entity({ name: 'lineas_investigacion' })
export class LineasInvestigacion {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int',nullable: false })
id_linea_inv: number;
@Column({ type: 'int', nullable: false })
@@ -4,7 +4,7 @@ import { Profesor } from "../../Profesor/entities/profesor.entity";
@Entity({ name: 'proyectos_academicos' })
export class ProyectosAcademicos {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_proyecto: number;
@Column({ type: 'int', nullable: false })
@@ -3,7 +3,7 @@ import { User } from '../../users/entities/user.entity';
@Entity({ name: 'tipo_usuario' })
export class TipoUsuario {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_tipo_usuario: number;
@Column({ type: 'varchar', length: 30, nullable: false })
+1 -1
View File
@@ -4,7 +4,7 @@ import { TipoUsuario } from "../../tipo_usuario/entities/tipo_usuario.entity";
@Entity({ name: 'usuario' })
export class User {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
@PrimaryColumn({ type: 'int', nullable: false })
id_usuario: number;
@Column({ type: 'int', nullable: false })