S
This commit is contained in:
Generated
+7
-4
@@ -22,7 +22,7 @@
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.1",
|
||||
"mysql": "^2.18.1",
|
||||
"mysql2": "^3.10.0",
|
||||
"mysql2": "^3.10.1",
|
||||
"passport": "^0.7.0",
|
||||
"passport-jwt": "^4.0.1",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
@@ -1893,6 +1893,7 @@
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/config/-/config-3.2.2.tgz",
|
||||
"integrity": "sha512-vGICPOui5vE6kPz1iwQ7oCnp3qWgqxldPmBQ9onkVoKlBtyc83KJCr7CjuVtf4OdovMAVcux1d8Q6jglU2ZphA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dotenv": "16.4.5",
|
||||
"dotenv-expand": "10.0.0",
|
||||
@@ -2056,6 +2057,7 @@
|
||||
"version": "10.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-10.0.2.tgz",
|
||||
"integrity": "sha512-H738bJyydK4SQkRCTeh1aFBxoO1E9xdL/HaLGThwrqN95os5mEyAtK7BLADOS+vldP4jDZ2VQPLj4epWwRqCeQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"uuid": "9.0.1"
|
||||
},
|
||||
@@ -7126,9 +7128,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mysql2": {
|
||||
"version": "3.10.0",
|
||||
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.0.tgz",
|
||||
"integrity": "sha512-qx0mfWYt1DpTPkw8mAcHW/OwqqyNqBLBHvY5IjN8+icIYTjt6znrgYJ+gxqNNRpVknb5Wc/gcCM4XjbCR0j5tw==",
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz",
|
||||
"integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"denque": "^2.1.0",
|
||||
"generate-function": "^2.3.1",
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.1",
|
||||
"mysql": "^2.18.1",
|
||||
"mysql2": "^3.10.0",
|
||||
"mysql2": "^3.10.1",
|
||||
"passport": "^0.7.0",
|
||||
"passport-jwt": "^4.0.1",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
|
||||
@@ -16,7 +16,7 @@ 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 })
|
||||
|
||||
@@ -3,7 +3,7 @@ import {Profesor} from "../../Profesor/entities/profesor.entity";
|
||||
|
||||
@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 })
|
||||
|
||||
+10
-10
@@ -5,7 +5,7 @@ import { AppService } from './app.service';
|
||||
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 { User } from './users/entities/user.entity';
|
||||
import { ProfesorModule } from './profesor/profesor.module';
|
||||
import { Profesor } from './profesor/entities/profesor.entity';
|
||||
|
||||
@@ -18,17 +18,17 @@ import { Profesor } from './profesor/entities/profesor.entity';
|
||||
isGlobal: true,
|
||||
}),
|
||||
TypeOrmModule.forRootAsync({
|
||||
imports: [ConfigModule,AuthModule,UsersModule,],
|
||||
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'),
|
||||
entities: [User,Profesor],
|
||||
synchronize:true,
|
||||
host: 'localhost',
|
||||
port: parseInt(configService.get<string>('DB_PORT'), 10),
|
||||
username: configService.get<string>('DB_USER'),
|
||||
password: configService.get<string>('DB_PASSWORD'),
|
||||
database: configService.get<string>('DB_DATABASE'),
|
||||
entities: [User, Profesor],
|
||||
synchronize: true,
|
||||
}),
|
||||
}),
|
||||
ProfesorModule,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm';
|
||||
import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm';
|
||||
import { AsignaturaCarreraProfesor } from "../../asignatura_carrera_profesor/entities/asignatura_carrera_profesor.entity";
|
||||
|
||||
@Entity()
|
||||
export class Asignatura {
|
||||
|
||||
@PrimaryGeneratedColumn()
|
||||
@PrimaryColumn()
|
||||
id_asignatura: number;
|
||||
|
||||
@Column({ type: 'varchar', length: 50, nullable: false })
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Carrera } from "../../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 })
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm';
|
||||
import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm';
|
||||
import { AsignaturaCarreraProfesor } from "../../asignatura_carrera_profesor/entities/asignatura_carrera_profesor.entity";
|
||||
|
||||
@Entity()
|
||||
export class Carrera {
|
||||
|
||||
@PrimaryGeneratedColumn()
|
||||
@PrimaryColumn({ type: 'int', nullable: false })
|
||||
id_carrera: number;
|
||||
|
||||
@Column({ type: 'varchar', length: 150, nullable: false })
|
||||
|
||||
@@ -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 })
|
||||
|
||||
@@ -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 })
|
||||
|
||||
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user