models

package
v0.0.0-...-9896131 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 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 CheckIfExistsReq

type CheckIfExistsReq struct {
	Table  string
	Column string
	Value  string
}

type CheckIfExistsRes

type CheckIfExistsRes struct {
	Exists bool
}

type CommentCreateReq

type CommentCreateReq struct {
	Id      string `json:"id"`
	UserId  string `json:"user_id"`
	PostId  string `json:"post_id"`
	Comment string `json:"comment"`
}

type CommentDeleteReq

type CommentDeleteReq struct {
	Id     string `json:"id"`
	UserId string `json:"user_id"`
}

type CommentFindReq

type CommentFindReq struct {
	Page             int    `json:"page"`
	Limit            int    `json:"limit"`
	OrderByCreatedAt uint64 `json:"order_by_created_at"`
	PostId           string `json:"post_id"`
}

type CommentFindResponse

type CommentFindResponse struct {
	Comments []*CommentResponse `json:"comments"`
	Count    int                `json:"count"`
}

type CommentGetReq

type CommentGetReq struct {
	Id string `json:"id"`
}

type CommentResponse

type CommentResponse struct {
	Id        string `json:"id"`
	UserId    string `json:"user_id"`
	PostId    string `json:"post_id"`
	Comment   string `json:"comment"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type CommentUpdateReq

type CommentUpdateReq struct {
	Id      string `json:"id"`
	UserId  string `json:"user_id"`
	Comment string `json:"comment"`
}

type File

type File struct {
	File *multipart.FileHeader `form:"file" binding:"required"`
}

type MediaResponse

type MediaResponse struct {
	ErrorCode    int            `json:"error_code"`
	ErrorMessage string         `json:"error_message"`
	Body         UploadPhotoRes `json:"body"`
}

type Otp

type Otp struct {
	Email string `json:"email"`
	Code  string `json:"code"`
}

type OtpCheckResponse

type OtpCheckResponse struct {
	ErrorCode    int    `json:"error_code"`
	ErrorMessage string `json:"error_message"`
	Body         struct {
		IsRight bool `json:"is_right"`
	} `json:"body"`
}

type PostCreateReq

type PostCreateReq struct {
	Id      string `json:"id"`
	Slug    string `json:"slug"`
	Title   string `json:"title"`
	Content string `json:"content"`
	UserId  string `json:"user_id"`
}

type PostDeleteReq

type PostDeleteReq struct {
	Id     string `json:"id"`
	UserId string `json:"user_id"`
}

type PostFindReq

type PostFindReq struct {
	Page             int    `json:"page"`
	Limit            int    `json:"limit"`
	OrderByCreatedAt uint64 `json:"order_by_created_at"`
	Search           string `json:"search"`
}

type PostFindResponse

type PostFindResponse struct {
	Posts []*PostResponse `json:"posts"`
	Count int             `json:"count"`
}

type PostGetReq

type PostGetReq struct {
	Id   string `json:"id"`
	Slug string `json:"slug"`
}

type PostResponse

type PostResponse struct {
	Id        string `json:"id"`
	Slug      string `json:"slug"`
	Title     string `json:"title"`
	Content   string `json:"content"`
	UserId    string `json:"user_id"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type PostUpdateReq

type PostUpdateReq struct {
	Id      string `json:"id"`
	Slug    string `json:"slug"`
	Title   string `json:"title"`
	Content string `json:"content"`
	UserId  string `json:"user_id"`
}

type StandardResponse

type StandardResponse struct {
	StatusId string `json:"status_id"`
	Message  string `json:"message"`
	Data     any    `json:"data"`
}

type UpdateSingleFieldReq

type UpdateSingleFieldReq struct {
	Id       any
	Table    string
	Column   string
	NewValue any
}

type UploadPhotoRes

type UploadPhotoRes struct {
	URL string `json:"photo_url"`
}

type UserApiUpdateReq

type UserApiUpdateReq struct {
	UserName string `json:"user_name"`
}

type UserCheckRes

type UserCheckRes struct {
	Status string `json:"status"`
}

type UserCheckResponse

type UserCheckResponse struct {
	ErrorCode    int           `json:"error_code"`
	ErrorMessage string        `json:"error_message"`
	Body         *UserCheckRes `json:"body"`
}

type UserCreateReq

type UserCreateReq struct {
	Id           string `json:"id"`
	FullName     string `json:"fullname"`
	UserName     string `json:"user_name"`
	Email        string `json:"email"`
	Password     string `json:"password"`
	RefreshToken string `json:"refresh_token"`
}

type UserDeleteReq

type UserDeleteReq struct {
	Id string `json:"id"`
}

type UserFindReq

type UserFindReq struct {
	Page  int `json:"page"`
	Limit int `json:"limit"`
}

type UserFindResponse

type UserFindResponse struct {
	Users []*UserResponse `json:"users"`
	Count int             `json:"count"`
}

type UserForgotPasswordVerifyReq

type UserForgotPasswordVerifyReq struct {
	NewPassword     string `json:"new_password"`
	Otp             string `json:"otp"`
	UserNameOrEmail string `json:"user_name_or_email"`
}

type UserGetReq

type UserGetReq struct {
	Id       string `json:"id"`
	Email    string `json:"email"`
	UserName string `json:"user_name"`
}

type UserLoginRequest

type UserLoginRequest struct {
	UserNameOrEmail string `json:"user_name_or_email"`
	Password        string `json:"password"`
}

type UserRegisterReq

type UserRegisterReq struct {
	FullName string `json:"fullname"`
	UserName string `json:"user_name"`
	Email    string `json:"email"`
	Password string `json:"password"`
	Otp      string `json:"otp"`
}

type UserResponse

type UserResponse struct {
	Id           string `json:"id"`
	FullName     string `json:"fullname"`
	UserName     string `json:"user_name"`
	Email        string `json:"email"`
	Password     string `json:"password"`
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
}

type UserUpdateReq

type UserUpdateReq struct {
	Id       string `json:"id"`
	UserName string `json:"user_name"`
	FullName string `json:"fullname"`
}

Jump to

Keyboard shortcuts

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