carrera motivo listo
This commit is contained in:
parent
c4ebe4efcf
commit
b8d2294328
@ -5,14 +5,12 @@ import { CarritoMotivoController } from './carrito-motivo.controller';
|
||||
import { CarritoMotivoService } from './carrito-motivo.service';
|
||||
import { CarritoMotivo } from './entity/carrito-motivo.entity';
|
||||
import { CarritoModule } from '../carrito/carrito.module';
|
||||
import { OperadorModule } from '../operador/operador.module';
|
||||
import { StatusModule } from '../status/status.module';
|
||||
import { ValidarUsuarioModule } from '../validar-usuario/validar-usuario.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
forwardRef(() => CarritoModule),
|
||||
OperadorModule,
|
||||
StatusModule,
|
||||
PassportModule.register({ defaultStrategy: 'jwt' }),
|
||||
TypeOrmModule.forFeature([CarritoMotivo]),
|
||||
|
@ -6,7 +6,6 @@ import { Carrito } from '../carrito/entity/carrito.entity';
|
||||
import { CarritoMotivo } from './entity/carrito-motivo.entity';
|
||||
import { Operador } from '../operador/entity/operador.entity';
|
||||
import { CarritoService } from '../carrito/carrito.service';
|
||||
import { OperadorService } from '../operador/operador.service';
|
||||
|
||||
@Injectable()
|
||||
export class CarritoMotivoService {
|
||||
@ -15,7 +14,6 @@ export class CarritoMotivoService {
|
||||
private repository: Repository<CarritoMotivo>,
|
||||
@Inject(forwardRef(() => CarritoService))
|
||||
private carritoService: CarritoService,
|
||||
private operadorService: OperadorService,
|
||||
) {}
|
||||
|
||||
async create(
|
||||
@ -26,6 +24,7 @@ export class CarritoMotivoService {
|
||||
) {
|
||||
const ahora = moment();
|
||||
|
||||
// Creo y gurado registro
|
||||
return this.repository.save(
|
||||
this.repository.create({
|
||||
carrito,
|
||||
|
@ -22,6 +22,12 @@ export class CarritoMotivo {
|
||||
@Column({ type: Boolean, nullable: false })
|
||||
status: boolean;
|
||||
|
||||
@Column({ type: Number, nullable: true })
|
||||
id_carrito: number;
|
||||
|
||||
@Column({ type: Number, nullable: true })
|
||||
id_operador: number;
|
||||
|
||||
@ManyToOne(() => Carrito, (carrito) => carrito.motivos)
|
||||
@JoinColumn({ name: 'id_carrito' })
|
||||
carrito: Carrito;
|
||||
|
Loading…
Reference in New Issue
Block a user