mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-13 08:58:48 +00:00
falta actualizar bien el resumen
This commit is contained in:
@ -3,6 +3,8 @@ package com.imprimelibros.erp.cart;
|
||||
import jakarta.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.imprimelibros.erp.presupuesto.dto.Presupuesto;
|
||||
|
||||
@Entity
|
||||
@Table(
|
||||
name = "cart_items",
|
||||
@ -17,8 +19,9 @@ public class CartItem {
|
||||
@JoinColumn(name = "cart_id", nullable = false)
|
||||
private Cart cart;
|
||||
|
||||
@Column(name = "presupuesto_id", nullable = false)
|
||||
private Long presupuestoId;
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "presupuesto_id", nullable = false)
|
||||
private Presupuesto presupuesto;
|
||||
|
||||
@Column(name = "created_at", nullable = false)
|
||||
private LocalDateTime createdAt = LocalDateTime.now();
|
||||
@ -29,8 +32,8 @@ public class CartItem {
|
||||
public Cart getCart() { return cart; }
|
||||
public void setCart(Cart cart) { this.cart = cart; }
|
||||
|
||||
public Long getPresupuestoId() { return presupuestoId; }
|
||||
public void setPresupuestoId(Long presupuestoId) { this.presupuestoId = presupuestoId; }
|
||||
public Presupuesto getPresupuesto() { return presupuesto; }
|
||||
public void setPresupuesto(Presupuesto presupuesto) { this.presupuesto = presupuesto; }
|
||||
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user