dto

package
v0.0.0-...-89144a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchProfessorParam

type FetchProfessorParam struct {
	Name    string `query:"name"`
	Faculty string `query:"faculty"`
	Major   string `query:"major"`
}

type FetchProfessorResponse

type FetchProfessorResponse struct {
	ID              string  `json:"id"`
	Name            string  `json:"name"`
	Faculty         string  `json:"faculty"`
	Major           string  `json:"major"`
	ProfileImgLink  string  `json:"profileImgLink"`
	ReviewsCount    uint64  `json:"reviewsCount"`
	AvgDiffRate     float32 `json:"avgDiffRate"`
	AvgFriendlyRate float32 `json:"avgFriendlyRate"`
	CreatedAt       string  `json:"createdAt"`
	UpdatedAt       string  `json:"updatedAt"`
}

type FetchReactionParams

type FetchReactionParams struct {
	ReviewID string
	UserID   string
}

type FetchReviewParams

type FetchReviewParams struct {
	ID         string
	ProfId     string `param:"profId"`
	UserId     string `param:"userId"`
	SignedUser string
}

type FetchReviewResponse

type FetchReviewResponse struct {
	ID           string                 `json:"id"`
	ProfessorID  string                 `json:"profId"`
	UserID       string                 `json:"userId"`
	Comment      string                 `json:"comment"`
	DiffRate     float32                `json:"difficultyRating"`
	FriendlyRate float32                `json:"friendlyRating"`
	CreatedAt    string                 `json:"createdAt"`
	IsLiked      int                    `json:"isLiked"`
	Like         int                    `json:"like"`
	Dislike      int                    `json:"dislike"`
	User         FetchUserResponse      `json:"user"`
	Professor    FetchProfessorResponse `json:"professor"`
}

type FetchUserParams

type FetchUserParams struct {
	ID       string
	Username string
	NIM      string
}

type FetchUserResponse

type FetchUserResponse struct {
	ID        string `json:"id"`
	NIM       string `json:"nim"`
	Username  string `json:"username"`
	CreatedAt string `json:"createdAt"`
}

type ForgotPasswordRequest

type ForgotPasswordRequest struct {
	NIM         string `json:"nim" validate:"required,max=16"`
	Password    string `json:"password" validate:"required"`
	Username    string `json:"username" validate:"required"`
	NewPassword string `json:"newPassword" validate:"required,alphanum,min=6,max=25"`
}

type PaginationQuery

type PaginationQuery struct {
	Page  uint `query:"page" validate:"min=1"`
	Limit uint `query:"limit" validate:"max=100"`
}

func (*PaginationQuery) SetDefaultValue

func (pageQuery *PaginationQuery) SetDefaultValue()

type PaginationResponse

type PaginationResponse struct {
	TotalItems uint `json:"totalItems"`
	TotalPages uint `json:"totalPages"`
	Current    uint `json:"current"`
	Next       uint `json:"next"`
	Prev       uint `json:"prev"`
}

type ProfessorRatingDistribution

type ProfessorRatingDistribution struct {
	ProfessorID           string                    `json:"profId"`
	DiffcultyDistribution entity.RatingDistribution `json:"difficultyDistribution"`
	FriendlyDistirbutuion entity.RatingDistribution `json:"friendlyDistribution"`
}

type ProfessorReviewRequest

type ProfessorReviewRequest struct {
	ProfessorID  string `param:"id" validate:"required"`
	UserID       string
	Comment      string  `json:"comment" validate:"required"`
	DiffRate     float32 `json:"diffRate" validate:"required,min=1,max=5"`
	FriendlyRate float32 `json:"friendlyRate" validate:"required,min=1,max=5"`
}

type ProfessorStatic

type ProfessorStatic struct {
	Name     string `json:"name"`
	Fakultas string `json:"fakultas"`
	Prodi    string `json:"prodi"`
	ImgLink  string `json:"img"`
}

type RefreshATRequest

type RefreshATRequest struct {
	RefreshToken string `json:"refreshToken" validate:"required"`
}

type ReviewReactionRequest

type ReviewReactionRequest struct {
	ReviewID string `param:"id" validate:"required"`
	UserID   string
	Type     string `json:"type" validate:"required,reactionType"`
}

type UserLoginRequest

type UserLoginRequest struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type UserProfileResponse

type UserProfileResponse struct {
	UserProfile   FetchUserResponse     `json:"user"`
	ReviewsCount  int                   `json:"reviewsCount"`
	RecentReviews []FetchReviewResponse `json:"recentReviews"`
}

type UserRegisterRequest

type UserRegisterRequest struct {
	NIM         string `json:"nim" validate:"required,max=16"`
	Password    string `json:"password" validate:"required"`
	Username    string `json:"username" validate:"required"`
	NewPassword string `json:"newPassword" validate:"required,alphanum,min=6,max=25"`
}

type UserTokenResponse

type UserTokenResponse struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL