Skip to content

Commit

Permalink
set up dto
Browse files Browse the repository at this point in the history
  • Loading branch information
QuocAnh189 committed Oct 10, 2024
1 parent 01cecb4 commit 259c926
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dtos/auth/SignIn.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface SignInDto {
identity: string
password: string
}
5 changes: 5 additions & 0 deletions src/dtos/auth/ValidateUser.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface ValidateUserDto {
email: string
phone: string
fullName: string
}
Empty file added src/dtos/event/Event.dto.ts
Empty file.
11 changes: 11 additions & 0 deletions src/dtos/pagination/Metadata.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface MetadataDto {
currentPage: number
totalPages: number
page: number
takeAll: boolean
pageSize: number
totalCount: number
payloadSize: number
hasPrevious: boolean
hasNext: boolean
}
4 changes: 4 additions & 0 deletions src/dtos/pagination/Search.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface SearchDto {
searchBy: string
searchValue: string
}
9 changes: 9 additions & 0 deletions src/dtos/review/Review.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface ReviewDto {
id: string
content: string
rate: number
event: string
author: string
createdAt: string
updatedAt: string
}
4 changes: 4 additions & 0 deletions src/dtos/review/UdpateReview.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface UpdateReviewDto {
content: string
rate: number
}
5 changes: 5 additions & 0 deletions src/dtos/user/UpdatePassword.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface UpdateUserPasswordDto {
userId: string
oldPassword: string
newPassword: string
}
21 changes: 21 additions & 0 deletions src/dtos/user/User.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { EGender, EUserStatus } from '@constants/enum.constant'

export interface UserDto {
id?: string
userName: string
email: string
phoneNumber: string
dob: string
fullName: string
gender: EGender
bio: string
avatar: string
status: EUserStatus
numberOfFollowers: number
numberOfFolloweds: number
numberOfFavourites: number
numberOfCreatedEvents: number
roles: string
createdAt: string
updatedAt: string
}

0 comments on commit 259c926

Please sign in to comment.