entities

package
v0.0.0-...-0851e75 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contest

type Contest struct {
	gorm.Model
	Title       string    `json:"title"`
	PostedAt    time.Time `json:"posted_at"`
	NumProblems int       `json:"num_problems"`
}

type Problem

type Problem struct {
	gorm.Model
	Title      string      `json:"title"`
	Tags       StringArray `json:"tags" gorm:"type:text[]"`
	Difficulty string      `json:"difficulty"`
	Track      string      `json:"track"`
	Link       string      `json:"link"`
	PostedAt   time.Time   `json:"posted_at"`
}

type StringArray

type StringArray []string

StringArray is a custom type for handling string arrays in PostgreSQL

func (*StringArray) Scan

func (a *StringArray) Scan(value interface{}) error

func (StringArray) Value

func (a StringArray) Value() (driver.Value, error)

type User

type User struct {
	ID       uuid.UUID `json:"id" gorm:"type:uuid;primaryKey"`
	Name     string    `json:"name" gorm:"column:name"`
	Email    string    `json:"email" gorm:"column:email;unique"`
	Password string    `json:"password" gorm:"column:password"`
	Role     string    `json:"role" gorm:"column:role"`
}

type UserLoginPayload

type UserLoginPayload struct {
	Email    string `json:"email" gorm:"column:email"`
	Password string `json:"password" gorm:"column:password"`
}

type UserProfile

type UserProfile struct {
	gorm.Model

	ID                uint   `json:"id"`
	Location          string `json:"location"`
	Email             string `json:"email"`
	TechStack         string `json:"tech_stack"`
	Group             string `json:"group"`
	Institution       string `json:"institution"`
	ProfilePictureURL string `json:"profile_picture"`
	IsOnline          bool   `json:"is_online"`

	LinkedIn   string `json:"linkedin"`
	Telegram   string `json:"telegram"`
	LeetCode   string `json:"leetcode"`
	Codeforces string `json:"codeforces"`
	HackerRank string `json:"hackerrank"`
	GitHub     string `json:"github"`
}

Jump to

Keyboard shortcuts

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