comment backend DTOs

This commit is contained in:
2026-04-20 15:18:54 -06:00
parent 447b5fc346
commit 0f35da597f
66 changed files with 396 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
/*
* Activity log entry returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.activity;
import java.time.LocalDateTime;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating an adoption.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.adoption;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Adoption record returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.adoption;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when a customer requests to adopt a pet.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.adoption;
import jakarta.validation.constraints.NotNull;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when asking the AI chatbot a question.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.ai;
import java.util.List;

View File

@@ -1,3 +1,9 @@
/*
* AI chatbot reply returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.ai;
public class AiChatResponse {

View File

@@ -1,3 +1,9 @@
/*
* Dashboard analytics data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.analytics;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when booking or updating an appointment.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.appointment;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Appointment details returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.appointment;
import java.time.LocalDate;

View File

@@ -1,3 +1,9 @@
/*
* Avatar upload result returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import java.util.Objects;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when a user requests a password reset.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Forgot password result returned with a reset token.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
public class ForgotPasswordResponse {

View File

@@ -1,3 +1,9 @@
/*
* Data sent when a user logs in.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Login result returned to the client with a token.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import java.util.Objects;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when a user updates their profile.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import jakarta.validation.constraints.Email;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when a new user registers an account.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import jakarta.validation.constraints.Email;

View File

@@ -1,3 +1,9 @@
/*
* Registration result returned to the client after signing up.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import java.util.Objects;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when a user sets a new password using a reset token.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Password reset confirmation returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
public class ResetPasswordResponse {

View File

@@ -1,3 +1,9 @@
/*
* Logged-in user profile data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.auth;
import java.util.Objects;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when adding a product to the shopping cart.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.cart;
import jakarta.validation.constraints.Min;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when applying a coupon code to the cart.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.cart;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Single cart item returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.cart;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Full shopping cart data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.cart;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when a customer checks out their cart.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.cart;
import jakarta.validation.constraints.NotNull;

View File

@@ -1,3 +1,9 @@
/*
* Checkout result returned to the client after placing an order.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.cart;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when updating the quantity of a cart item.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.cart;
import jakarta.validation.constraints.Min;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating a category.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.category;
import com.petshop.backend.util.SafeContent;

View File

@@ -1,3 +1,9 @@
/*
* Category data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.category;
import java.time.LocalDateTime;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when starting a new conversation.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.chat;
public class ConversationRequest {

View File

@@ -1,3 +1,9 @@
/*
* Conversation details returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.chat;
import com.petshop.backend.entity.Conversation;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when sending a chat message.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.chat;
public class MessageRequest {

View File

@@ -1,3 +1,9 @@
/*
* Chat message returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.chat;
import com.petshop.backend.entity.Message;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when changing the status of a conversation.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.chat;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when deleting multiple records at once.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.common;
import jakarta.validation.constraints.NotEmpty;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating a coupon.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.common;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Coupon details returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.common;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Simple id and label pair used for dropdown menus.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.common;
import java.util.Objects;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when updating inventory for a product.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.inventory;
import jakarta.validation.constraints.NotNull;

View File

@@ -1,3 +1,9 @@
/*
* Inventory record returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.inventory;
import java.time.LocalDateTime;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when a customer adds or updates their own pet.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.pet;
import jakarta.validation.constraints.Max;

View File

@@ -1,3 +1,9 @@
/*
* Customer's own pet data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.pet;
public class MyPetResponse {

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating a pet listing.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.pet;
import com.petshop.backend.util.SafeContent;

View File

@@ -1,3 +1,9 @@
/*
* Pet data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.pet;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating a product.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.product;
import com.petshop.backend.util.SafeContent;

View File

@@ -1,3 +1,9 @@
/*
* Product data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.product;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when deleting multiple product-supplier links at once.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.productsupplier;
import jakarta.validation.constraints.NotEmpty;

View File

@@ -1,3 +1,9 @@
/*
* Composite key identifying a product-supplier relationship.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.productsupplier;
import java.util.Objects;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when linking a product to a supplier.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.productsupplier;
import jakarta.validation.constraints.NotNull;

View File

@@ -1,3 +1,9 @@
/*
* Product-supplier link data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.productsupplier;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Purchase order data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.purchaseorder;
import java.time.LocalDate;

View File

@@ -1,3 +1,9 @@
/*
* Single refunded item returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.refund;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when requesting a refund for a sale.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.refund;
import com.petshop.backend.dto.sale.SaleItemRequest;

View File

@@ -1,3 +1,9 @@
/*
* Refund record returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.refund;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when updating the status of a refund.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.refund;
import jakarta.validation.constraints.NotBlank;

View File

@@ -1,3 +1,9 @@
/*
* Single line item included in a sale request.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.sale;
import jakarta.validation.constraints.NotNull;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when recording a new sale.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.sale;
import jakarta.validation.Valid;

View File

@@ -1,3 +1,9 @@
/*
* Sale record returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.sale;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating a service.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.service;
import com.petshop.backend.util.SafeContent;

View File

@@ -1,3 +1,9 @@
/*
* Service data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.service;
import java.math.BigDecimal;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating a store.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.store;
import com.petshop.backend.util.SafeContent;

View File

@@ -1,3 +1,9 @@
/*
* Store data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.store;
import java.time.LocalDateTime;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating a supplier.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.supplier;
import com.petshop.backend.util.SafeContent;

View File

@@ -1,3 +1,9 @@
/*
* Supplier data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.supplier;
import java.time.LocalDateTime;

View File

@@ -1,3 +1,9 @@
/*
* Data sent when creating or updating a user account.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.user;
import com.petshop.backend.util.SafeContent;

View File

@@ -1,3 +1,9 @@
/*
* User account data returned to the client.
*
* Author: Harkamal
* Date: April 2026
*/
package com.petshop.backend.dto.user;
import java.time.LocalDateTime;