models

package
v0.0.0-...-a1e5281 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

type ApiError struct {
	Code    int    `json:"errCode"`
	Message string `json:"errMessage"`
}

func (*ApiError) Error

func (apiError *ApiError) Error() string

type Field

type Field map[string]interface{}

type Fields

type Fields []Field

func (*Fields) Scan

func (ls *Fields) Scan(src any) error

func (Fields) Value

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

type Poll

type Poll struct {
	Id          *string    `json:"id,omitempty"`
	Name        *string    `json:"name,omitempty"`
	Category    *string    `json:"category,omitempty"`
	Fields      Fields     `json:"fields,omitempty"`
	CreatedBy   *string    `json:"created_by,omitempty"`
	LastUpdated *time.Time `json:"last_updated,omitempty"`
}

type PollFilters

type PollFilters struct {
	UserIds  *string `json:"userId,omitempty"`
	Category *string `json:"category,omitempty"`
}

func (PollFilters) Empty

func (a PollFilters) Empty() bool

type User

type User struct {
	Id          *string    `json:"id,omitempty"`
	Username    *string    `json:"username,omitempty"`
	Email       *string    `json:"email,omitempty"`
	Password    *string    `json:"password,omitempty"`
	LastUpdated *time.Time `json:"last_updated,omitempty"`
}

type Vote

type Vote struct {
	PollId      *string    `json:"poll_id,omitempty"`
	UserId      *string    `json:"user_id,omitempty"`
	Entry       Fields     `json:"entry,omitempty"`
	LastUpdated *time.Time `json:"last_updated,omitempty"`
}

Jump to

Keyboard shortcuts

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