listo tipo carrito
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ import { Operador } from './operador/entity/operador.entity';
|
||||
import { Prestamo } from './prestamo/entity/prestamo.entity';
|
||||
import { Programa } from './programa/entity/programa.entity';
|
||||
import { Status } from './status/entity/status.entity';
|
||||
import { TipoCarrito } from './tipo-carrito/tipo-carrito.entity';
|
||||
import { TipoCarrito } from './tipo-carrito/entity/tipo-carrito.entity';
|
||||
import { TipoEntrada } from './tipo-entrada/tipo-entrada.entity';
|
||||
import { TipoUsuario } from './tipo-usuario/tipo-usuario.entity';
|
||||
import { Usuario } from './usuario/usuario.entity';
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from 'typeorm';
|
||||
import { Equipo } from '../../equipo/entity/equipo.entity';
|
||||
import { Modulo } from '../../modulo/entity/modulo.entity';
|
||||
import { TipoCarrito } from '../../tipo-carrito/tipo-carrito.entity';
|
||||
import { TipoCarrito } from '../../tipo-carrito/entity/tipo-carrito.entity';
|
||||
|
||||
@Entity()
|
||||
export class Carrito {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Carrito } from '../../carrito/entity/carrito.entity';
|
||||
|
||||
@Entity()
|
||||
export class TipoCarrito {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_tipo_carrito: number;
|
||||
|
||||
@Column({ type: String, nullable: false, length: 1 })
|
||||
letra: string;
|
||||
|
||||
@Column({ type: String, nullable: false, length: 20 })
|
||||
tipo_carrito: string;
|
||||
|
||||
@OneToMany(() => Carrito, (carrito) => carrito.tipoCarrito)
|
||||
carritos: Carrito[];
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { TipoCarritoService } from './tipo-carrito.service';
|
||||
|
||||
@Controller('tipo-carrito')
|
||||
export class TipoCarritoController {
|
||||
constructor(private tipoCarritoService: TipoCarritoService) {}
|
||||
|
||||
@Get()
|
||||
get() {}
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import { Entity, Column, PrimaryGeneratedColumn, OneToMany } from 'typeorm';
|
||||
import { Carrito } from '../carrito/entity/carrito.entity';
|
||||
|
||||
@Entity()
|
||||
export class TipoCarrito {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_tipo_carrito: number;
|
||||
|
||||
@Column()
|
||||
tipo_carrito: string;
|
||||
|
||||
@Column()
|
||||
letra: string;
|
||||
|
||||
@OneToMany(() => Carrito, (carrito) => carrito.tipoCarrito)
|
||||
carritos: Carrito[];
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { TipoCarritoController } from './tipo-carrito.controller';
|
||||
import { TipoCarrito } from './tipo-carrito.entity';
|
||||
import { TipoCarritoService } from './tipo-carrito.service';
|
||||
import { TipoCarrito } from './entity/tipo-carrito.entity';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([TipoCarrito])],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Repository } from 'typeorm';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { TipoCarrito } from './tipo-carrito.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
import { TipoCarrito } from './entity/tipo-carrito.entity';
|
||||
|
||||
@Injectable()
|
||||
export class TipoCarritoService {
|
||||
|
||||
Reference in New Issue
Block a user