Spaces:
Runtime error
Runtime error
Delete models
Browse filesFiles changed (7)
- models/authentication_payload_model.goDeleted-7
- models/custom_claim.goDeleted-8
- models/database_orm_model.goDeleted-31
- models/exception_model.goDeleted-12
- models/model.goDeleted-1
- models/request_model.goDeleted-42
- models/response_model.goDeleted-25
1234567package models
type AccountData struct {
UserID uint
VerifyStatus string
ErrVerif error
}12345678package models
import "github.com/golang-jwt/jwt/v5"
type CustomClaims struct { jwt.RegisteredClaims UserID uint `json:"id"`}12345678910111213141516171819202122232425262728293031package models
import (
"time"
uuid "github.com/satori/go.uuid"
)
type Account struct {
Id uint `gorm:"primaryKey" json:"id"`
UUID uuid.UUID `gorm:"type:uuid" json:"uuid" `
Email string `gorm:"uniqueIndex" json:"email"`
Password string `json:"password"`
IsEmailVerified bool `json:"is_email_verified"`
IsDetailCompleted bool `json:"is_detail_completed"`
CreatedAt time.Time `json:"created_at"`
DeletedAt *time.Time `json:"deleted_at" gorm:"default:null"`
}
type AccountDetails struct {
ID uint `gorm:"primaryKey" json:"id"`
AccountId uint `json:"account_id"`
InitialName string `json:"initial_name"`
FullName *string `json:"full_name"`
University *string `json:"university"`
PhoneNumber *string `json:"phone_number"`
}
// Gorm table name settings
func (Account) TableName() string { return "account" }
func (AccountDetails) TableName() string { return "account_details" }123456789101112package models
type Exception struct {
Unauthorized bool `json:"unauthorized,omitempty"`
BadRequest bool `json:"bad_request,omitempty"`
DataNotFound bool `json:"data_not_found,omitempty"`
InternalServerError bool `json:"internal_server_error,omitempty"`
DataDuplicate bool `json:"data_duplicate,omitempty"`
QueryError bool `json:"query_error,omitempty"`
InvalidPasswordLength bool `json:"invalid_password_length,omitempty"`
Message string `json:"message,omitempty"`
}1package models123456789101112131415161718192021222324252627282930313233343536373839404142package models
type LoginRequest struct {
Email string `json:"email" binding:"required"`
Password string `json:"password" binding:"required"`
}
type RegisterRequest struct {
Name string `json:"name"`
Email string `json:"email" binding:"required,email"`
Phone int `json:"phone"`
Password string `json:"password" binding:"required"`
}
type ChangePasswordRequest struct {
OldPassword string `json:"old_password" binding:"required" `
NewPassword string `json:"new_password" binding:"required" `
}
type CreateVerifyEmailRequest struct {
Token uint `json:"token" binding:"required"`
}
type OptionsRequest struct {
OptionName string `json:"option_name" binding:"required"`
OptionValue []string `json:"option_values" binding:"required"`
}
type ExternalAuthRequest struct {
OauthID string `json:"oauth_id" binding:"required"`
OauthProvider string `json:"oauth_provider" binding:"required"`
IsAgreeTerms bool `json:"is_agree_terms"`
IsSexualDisease bool `json:"is_sexual_disease"`
}
type ForgotPasswordRequest struct {
Email string `json:"email" binding:"required,email"`
}
type ValidateForgotPasswordRequest struct {
Token uint `json:"token" binding:"required"`
NewPassword string `json:"new_password"`
}12345678910111213141516171819202122232425package models
type SuccessResponse struct {
Status string `json:"status"`
Message string `json:"message"`
Data any `json:"data"`
MetaData any `json:"meta_data"`
}
type ErrorResponse struct {
Status string `json:"status"`
Message string `json:"message"`
Errors Exception `json:"errors"`
MetaData any `json:"meta_data"`
}
type AuthenticatedUser struct {
Account Account `json:"account"`
Token string `json:"token"`
}
type UserProfileResponse struct {
Account Account `json:"account"`
Details AccountDetails `json:"details"`
}models/authentication_payload_model.goDeleted-7
models/custom_claim.goDeleted-8
models/database_orm_model.goDeleted-31
models/exception_model.goDeleted-12
models/model.goDeleted-1
models/request_model.goDeleted-42
models/response_model.goDeleted-25