Fix compilation issues
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package com.petshop.backend.dto.productsupplier;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BulkDeleteProductSupplierRequest {
|
||||
@NotEmpty(message = "Keys list cannot be empty")
|
||||
private List<ProductSupplierKey> keys;
|
||||
}
|
||||
@@ -11,8 +11,3 @@ public class ProductSupplierKey {
|
||||
private Long supplierId;
|
||||
}
|
||||
|
||||
@Data
|
||||
public class BulkDeleteProductSupplierRequest {
|
||||
@NotEmpty(message = "Keys list cannot be empty")
|
||||
private List<ProductSupplierKey> keys;
|
||||
}
|
||||
|
||||
@@ -24,16 +24,16 @@ public class PurchaseOrderResponse {
|
||||
private List<PurchaseOrderItemResponse> items;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PurchaseOrderItemResponse {
|
||||
private Long id;
|
||||
private Long productId;
|
||||
private String productName;
|
||||
private Integer quantity;
|
||||
private BigDecimal unitCost;
|
||||
private BigDecimal subtotal;
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class PurchaseOrderItemResponse {
|
||||
private Long id;
|
||||
private Long productId;
|
||||
private String productName;
|
||||
private Integer quantity;
|
||||
private BigDecimal unitCost;
|
||||
private BigDecimal subtotal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.petshop.backend.dto.refund;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RefundItemRequest {
|
||||
@NotNull(message = "Sale item ID is required")
|
||||
private Long saleItemId;
|
||||
|
||||
@NotNull(message = "Quantity is required")
|
||||
@Positive(message = "Quantity must be positive")
|
||||
private Integer quantity;
|
||||
}
|
||||
@@ -16,13 +16,3 @@ public class RefundRequest {
|
||||
|
||||
private String refundReason;
|
||||
}
|
||||
|
||||
@Data
|
||||
class RefundItemRequest {
|
||||
@NotNull(message = "Sale item ID is required")
|
||||
private Long saleItemId;
|
||||
|
||||
@NotNull(message = "Quantity is required")
|
||||
@Positive(message = "Quantity must be positive")
|
||||
private Integer quantity;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.petshop.backend.dto.sale;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SaleItemRequest {
|
||||
@NotNull(message = "Product ID is required")
|
||||
private Long productId;
|
||||
|
||||
@NotNull(message = "Quantity is required")
|
||||
@Positive(message = "Quantity must be positive")
|
||||
private Integer quantity;
|
||||
}
|
||||
@@ -26,13 +26,3 @@ public class SaleRequest {
|
||||
|
||||
private String notes;
|
||||
}
|
||||
|
||||
@Data
|
||||
class SaleItemRequest {
|
||||
@NotNull(message = "Product ID is required")
|
||||
private Long productId;
|
||||
|
||||
@NotNull(message = "Quantity is required")
|
||||
@Positive(message = "Quantity must be positive")
|
||||
private Integer quantity;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.petshop.backend.service;
|
||||
|
||||
import com.petshop.backend.dto.purchaseorder.PurchaseOrderItemResponse;
|
||||
import com.petshop.backend.dto.purchaseorder.PurchaseOrderResponse;
|
||||
import com.petshop.backend.dto.purchaseorder.PurchaseOrderResponse.PurchaseOrderItemResponse;
|
||||
import com.petshop.backend.entity.PurchaseOrder;
|
||||
import com.petshop.backend.entity.PurchaseOrderItem;
|
||||
import com.petshop.backend.exception.ResourceNotFoundException;
|
||||
|
||||
Reference in New Issue
Block a user