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;
|
private Long supplierId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
|
||||||
public class BulkDeleteProductSupplierRequest {
|
|
||||||
@NotEmpty(message = "Keys list cannot be empty")
|
|
||||||
private List<ProductSupplierKey> keys;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -24,12 +24,11 @@ public class PurchaseOrderResponse {
|
|||||||
private List<PurchaseOrderItemResponse> items;
|
private List<PurchaseOrderItemResponse> items;
|
||||||
private LocalDateTime createdAt;
|
private LocalDateTime createdAt;
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class PurchaseOrderItemResponse {
|
public static class PurchaseOrderItemResponse {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Long productId;
|
private Long productId;
|
||||||
private String productName;
|
private String productName;
|
||||||
@@ -37,3 +36,4 @@ public class PurchaseOrderItemResponse {
|
|||||||
private BigDecimal unitCost;
|
private BigDecimal unitCost;
|
||||||
private BigDecimal subtotal;
|
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;
|
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;
|
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;
|
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;
|
||||||
|
import com.petshop.backend.dto.purchaseorder.PurchaseOrderResponse.PurchaseOrderItemResponse;
|
||||||
import com.petshop.backend.entity.PurchaseOrder;
|
import com.petshop.backend.entity.PurchaseOrder;
|
||||||
import com.petshop.backend.entity.PurchaseOrderItem;
|
import com.petshop.backend.entity.PurchaseOrderItem;
|
||||||
import com.petshop.backend.exception.ResourceNotFoundException;
|
import com.petshop.backend.exception.ResourceNotFoundException;
|
||||||
|
|||||||
Reference in New Issue
Block a user