DTO used in the Application
This page aims to list all the DTO used in the Application.
ProductDTO
ProductDTO is what developers will receive when using a GET request on the product API. The data resembles the same structure as the class object which is stored in the backend and database.
ProductDTO Schema Detail:
Key
Datatype
Description
id
number
the ID of the product
name*
string
the title of the product
description*
string
the description describing the category of the product which it falls under
price*
number
minimum: 0 maximum: 9999 default: 0
the price of the product, accepts a number up to 2 decimal points
CreateProductDTO
CreateProductDTO is used to insert a new record into the database.
CreateProductDTO Schema Detail:
Key
Datatype
Description
name*
string
the title of the product
description*
string
the description describing the category of the product which it falls under
price*
number
minimum: 0 maximum: 9999 default: 0
the price of the product, accepts a number up to 2 decimal points
PaginationProductDTO
PaginationProductDTO is used when pagination is required for the product records retrieved from the GET Request.
PaginationProductDTO Schema Detail:
Key
Datatype
Description
currentPage*
number
default: 1
returns the current page
itemPerPage*
number
minimum: 10 maximum: 100 default: 50
returns the itemPerPage limit
totalItems*
number
default: 1
returns the total number of items in the records retrieved
totalPages*
number
default: 1
returns the total number of pages created
data*
ProductDTO
retrieve a list of ProductDTO for the current page
All data with an asterisk * basically means the data is not null and required to be initialised with a value at the point of data creation.
Last updated
Was this helpful?