models

package
v0.0.0-...-4811c58 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminGetIdea

type AdminGetIdea struct {
	Idea
	TeamID uuid.UUID `json:"team_id"`
}

type AdminGetProject

type AdminGetProject struct {
	Project
	TeamID uuid.UUID `json:"team_id"`
}

type AdminGetTeam

type AdminGetTeam struct {
	ID       uuid.UUID          `json:"id"`
	TeamName string             `json:"team_name"`
	TeamCode string             `json:"team_code"`
	LeaderID uuid.UUID          `json:"leader_id"`
	Round    int                `json:"round"`
	Users    []AdminGetTeamUser `json:"users"`
	Ideas    Idea               `json:"idea"`
	Project  Project            `json:"project"`
}

type AdminGetTeamUser

type AdminGetTeamUser struct {
	GetUser
	Email string `json:"email"`
}

type AdminUser

type AdminUser struct {
	ID                uuid.UUID `json:"id"`
	FirstName         string    `json:"first_name"`
	LastName          string    `json:"last_name"`
	RegNo             string    `json:"reg_no"`
	Email             string    `json:"email"`
	Password          string    `json:"-"`
	Phone             string    `json:"phone_number"`
	College           string    `json:"college"`
	City              string    `json:"city"`
	State             string    `json:"state"`
	Country           string    `json:"country"`
	Gender            string    `json:"gender"`
	Role              string    `json:"role"`
	IsBanned          bool      `json:"is_banned"`
	IsAdded           bool      `json:"is_added"`
	IsVitian          bool      `json:"is_vitian"`
	IsVerified        bool      `json:"is_verified"`
	IsLeader          bool      `json:"is_leader"`
	IsProfileComplete bool      `json:"is_profile_complete"`
	TeamID            uuid.UUID `json:"team_id"`
}

type BanUser

type BanUser struct {
	Email string `json:"email" validate:"required,email"`
}

type CompleteUserRequest

type CompleteUserRequest struct {
	FirstName   string `json:"first_name"          validate:"required,min=1,max=20"`
	LastName    string `json:"last_name"           validate:"required,min=1,max=20"`
	PhoneNumber string `json:"phone_number"        validate:"required,min=10"`
	Gender      string `json:"gender"              validate:"required"`
	IsVitian    *bool  `json:"is_vitian"           validate:"required"`
	VitEmail    string `json:"vit_email,omitempty" validate:"omitempty,email"`
	HostelBlock string `json:"block"`
	HostelRoom  string `json:"room"`
	College     string `json:"college"`
	City        string `json:"city"`
	State       string `json:"state"`
	Country     string `json:"country"`
	RegNo       string `json:"reg_no"              validate:"required"`
}

type CreateTeamRequest

type CreateTeamRequest struct {
	Name string `json:"name" validate:"required,min=1,max=50"`
}

type CreateUserRequest

type CreateUserRequest struct {
	Email    string `json:"email"    validate:"required,email"`
	Password string `json:"password" validate:"required,min=6"`
}

type ForgotPasswordRequest

type ForgotPasswordRequest struct {
	Email string `json:"email" validate:"required,email"`
}

type GetAdminUser

type GetAdminUser struct {
	GetUser
	Email string `json:"email"`
}

type GetTeam

type GetTeam struct {
	ID       uuid.UUID `json:"-"`
	TeamName string    `json:"team_name"`
	TeamCode string    `json:"team_code"`
	LeaderID uuid.UUID `json:"leader_id"`
	Round    int       `json:"round"`
	Users    []GetUser `json:"users"`
	Ideas    Idea      `json:"idea"`
	Project  Project   `json:"project"`
}

type GetUser

type GetUser struct {
	FullName string    `json:"name"`
	RegNo    string    `json:"reg_no"`
	ID       uuid.UUID `json:"id"`
	IsLeader bool      `json:"is_leader"`
}

type Idea

type Idea struct {
	ID          uuid.UUID `json:"-"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Track       string    `json:"track"`
	Github      string    `json:"github_link"`
	Figma       string    `json:"figma_link"`
	Others      string    `json:"others"`
	IsSelected  bool      `json:"is_selected"`
}

type IdeaRequest

type IdeaRequest struct {
	Title       string `json:"title"                 validate:"required,min=1,max=50"`
	Description string `json:"description"           validate:"required,min=50,max=2500"`
	Track       string `json:"track"                 validate:"required"`
	Github      string `json:"github_link,omitempty" validate:"omitempty,url"`
	Figma       string `json:"figma_link,omitempty"  validate:"omitempty,url"`
	Others      string `json:"others"`
}

type JoinTeamRequest

type JoinTeamRequest struct {
	Code string `json:"code" validate:"required,min=1,max=6"`
}

type KickMemberRequest

type KickMemberRequest struct {
	UserID string `json:"id" validate:"required"`
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"    validate:"required,email"`
	Password string `json:"password" validate:"required,min=4"`
}

type Project

type Project struct {
	ID          uuid.UUID `json:"-"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Track       string    `json:"track"`
	GithubLink  string    `json:"github_link"`
	FigmaLink   string    `json:"figma_link"`
	Others      string    `json:"others"`
}

type ProjectRequest

type ProjectRequest struct {
	Name        string `json:"name"        validate:"required,min=1,max=50"`
	Description string `json:"description" validate:"required,min=50,max=2500"`
	Track       string `json:"track"       validate:"required"`
	GithubLink  string `json:"github_link" validate:"omitempty,url"`
	FigmaLink   string `json:"figma_link"  validate:"omitempty,url"`
	Others      string `json:"others"`
}

type ResendOTPRequest

type ResendOTPRequest struct {
	Email string `json:"email" validate:"required,email"`
	Type  string `json:"type"  validate:"required,oneof=verification resetpass"`
}

type ResetPasswordRequest

type ResetPasswordRequest struct {
	Email    string `json:"email"        validate:"required,email"`
	OTP      string `json:"otp"          validate:"required,min=6,max=6"`
	Password string `json:"new_password" validate:"required,min=6"`
}

type SelectIdeaRequest

type SelectIdeaRequest struct {
	IdeaID uuid.UUID `json:"idea_id" validate:"required"`
}

type Team

type Team struct {
	ID    uuid.UUID `json:"id"`
	Name  string    `json:"name"`
	Code  string    `json:"code"`
	Round int       `json:"round"`
	// Users    []uuid.UUID `json:"member_id"`
	LeaderID uuid.UUID `json:"leader_id"`
	Users    []User    `json:"users"`
}

type TeamReview

type TeamReview struct {
	ID                 uuid.UUID `json:"id"`
	TeamID             uuid.UUID `json:"team_id"`
	Reviewer           string    `json:"reviewer"`
	InnovationScore    float64   `json:"innovation_and_creativity"`
	FunctionalityScore float64   `json:"functionality_and_completeness"`
	DesignScore        float64   `json:"ui_and_design"`
	TechScore          float64   `json:"techincal_implementation"`
	PresentationScore  float64   `json:"presentation_and_communication"`
	ReviewRound        int       `json:"review_round"`
	Comments           string    `json:"comments"`
	TotalScore         float64   `json:"total_score"`
}

type TeamReviewRequest

type TeamReviewRequest struct {
	TeamID             uuid.UUID `json:"team_id"                        validate:"required,uuid"`
	Reviewer           string    `json:"reviewer"                       validate:"required"`
	InnovationScore    float64   `json:"innovation_and_creativity"      validate:"required"`
	FunctionalityScore float64   `json:"functionality_and_completeness" validate:"required"`
	DesignScore        float64   `json:"ui_and_design"                  validate:"required"`
	TechScore          float64   `json:"techincal_implementation"       validate:"required"`
	PresentationScore  float64   `json:"presentation_and_communication" validate:"required"`
	ReviewRound        int       `json:"review_round"                   validate:"required"`
	Comments           string    `json:"comments"`
}

type UpdateIdeaRequest

type UpdateIdeaRequest struct {
	Title       string `json:"title,omitempty"       validate:"omitempty,min=1,max=50"`
	Description string `json:"description,omitempty" validate:"omitempty,min=50,max=2500"`
	Track       string `json:"track,omitempty"`
	Github      string `json:"github_link,omitempty" validate:"omitempty,url"`
	Figma       string `json:"figma_link,omitempty"  validate:"omitempty,url"`
	Others      string `json:"others,omitempty"`
}

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Name        string `json:"name"        validate:"omitempty,min=1,max=50"`
	Description string `json:"description" validate:"omitempty,min=50,max=2500"`
	Track       string `json:"track"`
	GithubLink  string `json:"github_link" validate:"omitempty,url"`
	FigmaLink   string `json:"figma_link"  validate:"omitempty,url"`
	Others      string `json:"others"`
}

type UpdateTeamReviewRequest

type UpdateTeamReviewRequest struct {
	ID                 uuid.UUID `json:"id"                                       validate:"required,uuid"`
	Reviewer           string    `json:"reviewer"`
	InnovationScore    *float64  `json:"innovation_and_creativity,omitempty"`
	FunctionalityScore *float64  `json:"functionality_and_completeness,omitempty"`
	DesignScore        *float64  `json:"ui_and_design,omitempty"`
	TechScore          *float64  `json:"techincal_implementation,omitempty"`
	PresentationScore  *float64  `json:"presentation_and_communication,omitempty"`
	ReviewRound        *int      `json:"review_round,omitempty"`
	Comments           string    `json:"comments"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	FirstName   string `json:"first_name,omitempty"   validate:"omitempty,min=1,max=20"`
	LastName    string `json:"last_name,omitempty"    validate:"omitempty,min=1,max=20"`
	PhoneNumber string `json:"phone_number,omitempty" validate:"omitempty,min=10"`
	Gender      string `json:"gender,omitempty"       validate:"omitempty"`
	VitEmail    string `json:"vit_email,omitempty"    validate:"omitempty"`
	HostelBlock string `json:"block,omitempty"        validate:"omitempty"`
	College     string `json:"college,omitempty"      validate:"omitempty"`
	City        string `json:"city,omitempty"         validate:"omitempty"`
	State       string `json:"state,omitempty"        validate:"omitempty"`
	Country     string `json:"country,omitempty"      validate:"omitempty"`
	RegNo       string `json:"reg_no,omitempty"       validate:"omitempty"`
	Room        string `json:"room,omitempty"         validate:"omitempty"`
}

type User

type User struct {
	ID                uuid.UUID `json:"id"`
	FirstName         string    `json:"first_name"`
	LastName          string    `json:"last_name"`
	RegNo             string    `json:"reg_no"`
	Email             string    `json:"email"`
	Password          string    `json:"-"`
	Phone             string    `json:"phone_number"`
	College           string    `json:"college"`
	City              string    `json:"city"`
	State             string    `json:"state"`
	Country           string    `json:"country"`
	Gender            string    `json:"gender"`
	Role              string    `json:"role"`
	IsBanned          bool      `json:"-"`
	IsAdded           bool      `json:"-"`
	IsVitian          bool      `json:"-"`
	IsVerified        bool      `json:"-"`
	IsLeader          bool      `json:"is_leader"`
	IsProfileComplete bool      `json:"-"`
	TeamID            uuid.UUID `json:"team_id"`
}

func NewUser

func NewUser(email string, password string, role string) *User

type UserDetails

type UserDetails struct {
	User
	VITDetails
}

type VITDetails

type VITDetails struct {
	Email string `json:"vit_email" validate:"required,email"`
	Block string `json:"block"     validate:"required"`
	Room  string `json:"room"      validate:"required"`
}

type VerifyUserRequest

type VerifyUserRequest struct {
	Email string `json:"email" validate:"required,email"`
	OTP   string `json:"otp"   validate:"required,min=6,max=6"`
}

Jump to

Keyboard shortcuts

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