model

package
v0.0.0-...-fe1601c Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Id        bson.ObjectId   `bson:"_id,omitempty" json:"id"`
	UserId    bson.ObjectId   `bson:"user_id,omitempty" json:"user_id"`
	Event     string          `bson:"event,omitempty" event:"related"`
	RelatedId bson.ObjectId   `bson:"related_id,omitempty" json:"related_id,omitempty"`
	List      []bson.ObjectId `bson:"list,omitempty" json:"list,omitempty"`
	Created   time.Time       `bson:"created_at" json:"created_at"`
}

type Author

type Author struct {
	Id      bson.ObjectId `bson:"id,omitempty" json:"id,omitempty"`
	Title   string        `bson:"name" json:"name"`
	Email   string        `bson:"email" json:"email"`
	Avatar  string        `bson:"avatar" json:"avatar"`
	Profile interface{}   `bson:"profile,omitempty" json:"profile,omitempty"`
}

type ByBestRated

type ByBestRated []FeedPost

func (ByBestRated) Len

func (slice ByBestRated) Len() int

func (ByBestRated) Less

func (slice ByBestRated) Less(i, j int) bool

func (ByBestRated) Swap

func (slice ByBestRated) Swap(i, j int)

type ByCommentCreatedAt

type ByCommentCreatedAt []Comment

ByCommentCreatedAt implements sort.Interface for []ElectionOption based on Created field

func (ByCommentCreatedAt) Len

func (a ByCommentCreatedAt) Len() int

func (ByCommentCreatedAt) Less

func (a ByCommentCreatedAt) Less(i, j int) bool

func (ByCommentCreatedAt) Swap

func (a ByCommentCreatedAt) Swap(i, j int)

type ByCreatedAt

type ByCreatedAt []UserActivity

func (ByCreatedAt) Len

func (a ByCreatedAt) Len() int

func (ByCreatedAt) Less

func (a ByCreatedAt) Less(i, j int) bool

func (ByCreatedAt) Swap

func (a ByCreatedAt) Swap(i, j int)

type ByElectionsCreatedAt

type ByElectionsCreatedAt []ElectionOption

ByElectionsCreatedAt implements sort.Interface for []ElectionOption based on Created field

func (ByElectionsCreatedAt) Len

func (a ByElectionsCreatedAt) Len() int

func (ByElectionsCreatedAt) Less

func (a ByElectionsCreatedAt) Less(i, j int) bool

func (ByElectionsCreatedAt) Swap

func (a ByElectionsCreatedAt) Swap(i, j int)

type Categories

type Categories []Category

func (Categories) Len

func (slice Categories) Len() int

func (Categories) Less

func (slice Categories) Less(i, j int) bool

func (Categories) Swap

func (slice Categories) Swap(i, j int)

type CategoriesOrder

type CategoriesOrder []Category

func (CategoriesOrder) Len

func (slice CategoriesOrder) Len() int

func (CategoriesOrder) Less

func (slice CategoriesOrder) Less(i, j int) bool

func (CategoriesOrder) Swap

func (slice CategoriesOrder) Swap(i, j int)

type Category

type Category struct {
	Id          bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	Name        string        `bson:"name" json:"name"`
	Description string        `bson:"description" json:"description"`
	Slug        string        `bson:"slug" json:"slug"`
	Color       string        `bson:"color" json:"color"`
	Permissions CategoryAcl   `bson:"permissions" json:"permissions"`
	Parent      bson.ObjectId `bson:"parent,omitempty" json:"parent,omitempty"`
	Order       int           `bson:"order,omitempty" json:"order,omitempty"`
	Count       int           `bson:"count,omitempty" json:"count,omitempty"`
	Recent      int           `bson:"recent,omitempty" json:"recent,omitempty"`
	Child       []Category    `bson:"subcategories,omitempty" json:"subcategories,omitempty"`
}

type CategoryAcl

type CategoryAcl struct {
	Read  []string `bson:"read" json:"read"`
	Write []string `bson:"write" json:"write"`
}

type CategoryCounter

type CategoryCounter struct {
	Slug  string `json:"slug"`
	Count int    `json:"count"`
}

type CategoryCounters

type CategoryCounters struct {
	List []CategoryCounter `json:"list"`
}

type Comment

type Comment struct {
	UserId   bson.ObjectId `bson:"user_id" json:"user_id"`
	Votes    Votes         `bson:"votes" json:"votes"`
	User     interface{}   `bson:"-" json:"author,omitempty"`
	Position int           `bson:"position" json:"position"`
	Liked    int           `bson:"-" json:"liked,omitempty"`
	Content  string        `bson:"content" json:"content"`
	Chosen   bool          `bson:"chosen,omitempty" json:"chosen,omitempty"`
	Created  time.Time     `bson:"created_at" json:"created_at"`
	Deleted  time.Time     `bson:"deleted_at" json:"deleted_at"`
}

type CommentAggregated

type CommentAggregated struct {
	Id      bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	Comment Comment       `bson:"comment" json:"comment"`
}

type CommentForm

type CommentForm struct {
	Content string `json:"content" binding:"required"`
}

type Comments

type Comments struct {
	Count  int       `bson:"count" json:"count"`
	Total  int       `bson:"-" json:"total"`
	Answer *Comment  `bson:"-" json:"answer,omitempty"`
	Set    []Comment `bson:"set" json:"set"`
}

type CommentsPost

type CommentsPost struct {
	Id       bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	Comments Comments      `bson:"comments" json:"comments"`
}

type Component

type Component struct {
	Content   string           `bson:"content" json:"content"`
	Elections bool             `bson:"elections" json:"elections"`
	Options   []ElectionOption `bson:"options,omitempty" json:"options"`
	Votes     Votes            `bson:"votes" json:"votes"`
	Status    string           `bson:"status" json:"status"`
	Voted     string           `bson:"voted,omitempty" json:"voted,omitempty"`
}

type Components

type Components struct {
	Cpu               Component `bson:"cpu,omitempty" json:"cpu,omitempty"`
	Motherboard       Component `bson:"motherboard,omitempty" json:"motherboard,omitempty"`
	Ram               Component `bson:"ram,omitempty" json:"ram,omitempty"`
	Storage           Component `bson:"storage,omitempty" json:"storage,omitempty"`
	Cooler            Component `bson:"cooler,omitempty" json:"cooler,omitempty"`
	Power             Component `bson:"power,omitempty" json:"power,omitempty"`
	Cabinet           Component `bson:"cabinet,omitempty" json:"cabinet,omitempty"`
	Screen            Component `bson:"screen,omitempty" json:"screen,omitempty"`
	Videocard         Component `bson:"videocard,omitempty" json:"videocard,omitempty"`
	Software          string    `bson:"software,omitempty" json:"software,omitempty"`
	Budget            string    `bson:"budget,omitempty" json:"budget,omitempty"`
	BudgetCurrency    string    `bson:"budget_currency,omitempty" json:"budget_currency,omitempty"`
	BudgetType        string    `bson:"budget_type,omitempty" json:"budget_type,omitempty"`
	BudgetFlexibility string    `bson:"budget_flexibility,omitempty" json:"budget_flexibility,omitempty"`
}

type Counter

type Counter struct {
	UserId   bson.ObjectId          `bson:"user_id" json:"user_id"`
	Counters map[string]PostCounter `bson:"counters" json:"counters"`
}

type ElectionForm

type ElectionForm struct {
	Component string `json:"component" binding:"required"`
	Content   string `json:"content" binding:"required"`
}

type ElectionOption

type ElectionOption struct {
	UserId  bson.ObjectId `bson:"user_id" json:"user_id"`
	Content string        `bson:"content" json:"content"`
	User    interface{}   `bson:"author,omitempty" json:"author,omitempty"`
	Votes   Votes         `bson:"votes" json:"votes"`
	Created time.Time     `bson:"created_at" json:"created_at"`
}

type FeedComments

type FeedComments struct {
	Count int `bson:"count" json:"count"`
}

type FeedPost

type FeedPost struct {
	Id         bson.ObjectId   `bson:"_id,omitempty" json:"id,omitempty"`
	Title      string          `bson:"title" json:"title"`
	Slug       string          `bson:"slug" json:"slug"`
	Type       string          `bson:"type" json:"type"`
	Categories []string        `bson:"categories" json:"categories"`
	Users      []bson.ObjectId `bson:"users,omitempty" json:"users,omitempty"`
	Category   bson.ObjectId   `bson:"category" json:"category"`
	Comments   FeedComments    `bson:"comments" json:"comments"`
	Author     User            `bson:"author,omitempty" json:"author,omitempty"`
	UserId     bson.ObjectId   `bson:"user_id,omitempty" json:"user_id,omitempty"`
	Votes      Votes           `bson:"votes" json:"votes"`
	Pinned     bool            `bson:"pinned,omitempty" json:"pinned,omitempty"`
	Solved     bool            `bson:"solved,omitempty" json:"solved,omitempty"`
	IsQuestion bool            `bson:"is_question" json:"is_question"`
	Stats      FeedPostStat    `bson:"stats,omitempty" json:"stats"`
	Created    time.Time       `bson:"created_at" json:"created_at"`
	Updated    time.Time       `bson:"updated_at" json:"updated_at"`
}

type FeedPostStat

type FeedPostStat struct {
	Viewed      int     `bson:"viewed,omitempty" json:"viewed"`
	Reached     int     `bson:"reached,omitempty" json:"reached"`
	ViewRate    float64 `bson:"view_rate,omitempty" json:"view_rate"`
	CommentRate float64 `bson:"comment_rate,omitempty" json:"comment_rate"`
	FinalRate   float64 `bson:"final_rate,omitempty" json:"final_rate"`
}

type GamingRules

type GamingRules struct {
	Updated time.Time   `json:"updated_at"`
	Rules   []RuleModel `json:"rules"`
}

type MentionModel

type MentionModel struct {
	PostId bson.ObjectId `bson:"post_id" json:"post_id"`
	UserId bson.ObjectId `bson:"user_id" json:"user_id"`
	Nested int           `bson:"nested" json:"nested"`
}

type Notification

type Notification struct {
	Id        bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	UserId    bson.ObjectId `bson:"user_id" json:"user_id"`
	RelatedId bson.ObjectId `bson:"related_id" json:"related_id"`
	Title     string        `bson:"title" json:"title"`
	Text      string        `bson:"text" json:"text"`
	Link      string        `bson:"link" json:"link"`
	Related   string        `bson:"related" json:"related"`
	Seen      bool          `bson:"seen" json:"seen"`
	Image     string        `bson:"image" json:"image"`
	Created   time.Time     `bson:"created_at" json:"created_at"`
	Updated   time.Time     `bson:"updated_at" json:"updated_at"`
}

type PartByModel

type PartByModel struct {
	Id              bson.ObjectId `bson:"_id,omitempty" json:"id"`
	Name            string        `bson:"name" json:"name"`
	Type            string        `bson:"type" json:"type"`
	Slug            string        `bson:"slug" json:"slug"`
	Price           float64       `bson:"price" json:"price"`
	Manufacturer    string        `bson:"manufacturer,omitempty" json:"manufacturer,omitempty"`
	PartNumber      string        `bson:"partnumber,omitempty" json:"partnumber,omitempty"`
	Model           string        `bson:"model,omitempty" json:"model,omitempty"`
	Socket          string        `bson:"supported_sockets,omitempty" json:"supported_sockets,omitempty"`
	LiquidCooled    bool          `bson:"liquid_cooled,omitempty" json:"liquid_cooled,omitempty"`
	BearingType     string        `bson:"bearing_type,omitempty" json:"bearing_type,omitempty"`
	NoiseLevel      string        `bson:"noise_level,omitempty" json:"noise_level,omitempty"`
	FanRpm          string        `bson:"fan_rpm,omitempty" json:"fan_rpm,omitempty"`
	Speed           string        `bson:"speed,omitempty" json:"speed,omitempty"`
	Size            string        `bson:"size,omitempty" json:"size,omitempty"`
	PriceGb         string        `bson:"gb_price,omitempty" json:"gb_price,omitempty"`
	Cas             string        `bson:"cas,omitempty" json:"cas,omitempty"`
	Voltage         string        `bson:"voltage,omitempty" json:"voltage,omitempty"`
	HeatSpreader    bool          `bson:"heat_spreader,omitempty" json:"heat_spreader,omitempty"`
	Ecc             bool          `bson:"ecc,omitempty" json:"ecc,omitempty"`
	Registered      bool          `bson:"registered,omitempty" json:"registered,omitempty"`
	Color           string        `bson:"color,omitempty" json:"color,omitempty"`
	Chipset         string        `bson:"chipset,omitempty" json:"chipset,omitempty"`
	MemorySlots     string        `bson:"memory_slots,omitempty" json:"memory_slots,omitempty"`
	MemoryType      string        `bson:"memory_type,omitempty" json:"memory_type,omitempty"`
	MaxMemory       string        `bson:"memory_max,omitempty" json:"memory_max,omitempty"`
	RaidSupport     bool          `bson:"raid_support,omitempty" json:"raid_support,omitempty"`
	OnboardVideo    bool          `bson:"onboard_video,omitempty" json:"onboard_video,omitempty"`
	Crossfire       bool          `bson:"crossfire_support,omitempty" json:"crossfire_support,omitempty"`
	SliSupport      bool          `bson:"sli_support,omitempty" json:"sli_support,omitempty"`
	SATA            string        `bson:"sata_6gbs" json:"sata_6gbs"`
	OnboardEthernet string        `bson:"onboard_ethernet,omitempty" json:"onboard_ethernet,omitempty"`
	OnboardUsb3     bool          `bson:"onboard_usb_3,omitempty" json:"onboard_usb_3,omitempty"`
	Capacity        string        `bson:"capacity,omitempty" json:"capacity,omitempty"`
	Interface       string        `bson:"interface,omitempty" json:"interface,omitempty"`
	Cache           string        `bson:"cache,omitempty" json:"cache,omitempty"`
	SsdController   string        `bson:"ssd_controller,omitempty" json:"ssd_controller,omitempty"`
	FormFactor      string        `bson:"form_factor,omitempty" json:"form_factor,omitempty"`
	GbPerDollar     string        `bson:"gb_per_dollar,omitempty" json:"gb_per_dollar,omitempty"`
}

type Post

type Post struct {
	Id                bson.ObjectId   `bson:"_id,omitempty" json:"id,omitempty"`
	Title             string          `bson:"title" json:"title"`
	Slug              string          `bson:"slug" json:"slug"`
	Type              string          `bson:"type" json:"type"`
	Content           string          `bson:"content" json:"content"`
	Categories        []string        `bson:"categories" json:"categories"`
	Category          bson.ObjectId   `bson:"category" json:"category"`
	Comments          Comments        `bson:"comments" json:"comments"`
	Author            User            `bson:"-" json:"author,omitempty"`
	UserId            bson.ObjectId   `bson:"user_id,omitempty" json:"user_id,omitempty"`
	Users             []bson.ObjectId `bson:"users,omitempty" json:"users,omitempty"`
	Votes             Votes           `bson:"votes" json:"votes"`
	Components        Components      `bson:"components,omitempty" json:"components,omitempty"`
	RelatedComponents []bson.ObjectId `bson:"related_components,omitempty" json:"related_components,omitempty"`
	Following         bool            `bson:"following,omitempty" json:"following,omitempty"`
	Pinned            bool            `bson:"pinned,omitempty" json:"pinned,omitempty"`
	Lock              bool            `bson:"lock" json:"lock"`
	IsQuestion        bool            `bson:"is_question" json:"is_question"`
	Solved            bool            `bson:"solved,omitempty" json:"solved,omitempty"`
	Liked             int             `bson:"liked,omitempty" json:"liked,omitempty"`
	Created           time.Time       `bson:"created_at" json:"created_at"`
	Updated           time.Time       `bson:"updated_at" json:"updated_at"`
	Deleted           time.Time       `bson:"deleted_at,omitempty" json:"deleted_at,omitempty"`
}

type PostCommentCountModel

type PostCommentCountModel struct {
	Id    bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	Count int           `bson:"count" json:"count"`
}

type PostCommentModel

type PostCommentModel struct {
	Id      bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	Title   string        `bson:"title" json:"title"`
	Slug    string        `bson:"slug" json:"slug"`
	Comment Comment       `bson:"comment" json:"comment"`
}

type PostCounter

type PostCounter struct {
	Counter int       `bson:"counter" json:"counter"`
	Updated time.Time `bson:"updated_at" json:"updated_at"`
}

type PostForm

type PostForm struct {
	Kind       string                 `json:"kind" binding:"required"`
	Title      string                 `json:"title" binding:"required"`
	Content    string                 `json:"content" binding:"required"`
	Budget     string                 `json:"budget"`
	Currency   string                 `json:"currency"`
	Moves      string                 `json:"moves"`
	Software   string                 `json:"software"`
	Tag        string                 `json:"tag"`
	Category   string                 `json:"category"`
	IsQuestion bool                   `json:"is_question"`
	Pinned     bool                   `json:"pinned"`
	Lock       bool                   `json:"lock"`
	Components map[string]interface{} `json:"components"`
}

type RuleModel

type RuleModel struct {
	Level   int    `json:"level"`
	Name    string `json:"name"`
	Start   int    `json:"swords_start"`
	End     int    `json:"swords_end"`
	Tribute int    `json:"tribute"`
	Shit    int    `json:"shit"`
	Coins   int    `json:"coins"`
}

type SitemapSet

type SitemapSet struct {
	XMLName     xml.Name     `xml:"urlset"`
	XMLNs       string       `xml:"xmlns,attr"`
	XSI         string       `xml:"xmlns:xsi,attr"`
	XSILocation string       `xml:"xsi:schemaLocation,attr"`
	Urls        []SitemapUrl `xml:"url"`
}

type SitemapUrl

type SitemapUrl struct {
	Location string `xml:"loc"`
	Updated  string `xml:"lastmod"`
	Priority string `xml:"priority"`
}

type Stats

type Stats struct {
	Comments int `json:"comments"`
	Users    int `json:"users"`
	Posts    int `json:"posts"`
}

type StatsComments

type StatsComments struct {
	Id    bson.ObjectId `bson:"_id,omitempty" json:"_id,omitempty"`
	Count int           `bson:"count" json:"count"`
}

type User

type User struct {
	Id            bson.ObjectId          `bson:"_id,omitempty" json:"id"`
	FirstName     string                 `bson:"first_name" json:"first_name"`
	LastName      string                 `bson:"last_name" json:"last_name"`
	UserName      string                 `bson:"username" json:"username"`
	UserNameSlug  string                 `bson:"username_slug" json:"username_slug"`
	NameChanges   int                    `bson:"name_changes" json:"name_changes"`
	Password      string                 `bson:"password" json:"-"`
	Step          int                    `bson:"step,omitempty" json:"step"`
	Email         string                 `bson:"email" json:"email,omitempty"`
	Categories    []bson.ObjectId        `bson:"categories,omitempty" json:"categories,omitempty"`
	Roles         []UserRole             `bson:"roles" json:"roles,omitempty"`
	Permissions   []string               `bson:"permissions" json:"permissions,omitempty"`
	Description   string                 `bson:"description" json:"description,omitempty"`
	Image         string                 `bson:"image" json:"image,omitempty"`
	Facebook      interface{}            `bson:"facebook,omitempty" json:"facebook,omitempty"`
	Notifications interface{}            `bson:"notifications,omitempty" json:"notifications,omitempty"`
	Profile       map[string]interface{} `bson:"profile,omitempty" json:"profile,omitempty"`
	Gaming        UserGaming             `bson:"gaming,omitempty" json:"gaming,omitempty"`
	Stats         UserStats              `bson:"stats,omitempty" json:"stats,omitempty"`
	Version       string                 `bson:"version,omitempty" json:"version,omitempty"`
	Validated     bool                   `bson:"validated" json:"validated"`
	Seen          *time.Time             `bson:"last_seen_at" json:"last_seen_at,omitempty"`
	Created       time.Time              `bson:"created_at" json:"created_at"`
	Updated       time.Time              `bson:"updated_at" json:"updated_at"`
}

type UserActivity

type UserActivity struct {
	Id        bson.ObjectId     `json:"related_id"`
	Title     string            `json:"title"`
	Slug      string            `json:"slug"`
	Directive string            `json:"directive"`
	Content   string            `json:"content"`
	Author    map[string]string `json:"user"`
	Created   time.Time         `json:"created_at"`
}

type UserFirebase

type UserFirebase struct {
	Online  int    `json:"online"`
	Viewing string `json:"viewing"`
	Pending int    `json:"pending"`
}

type UserFirebaseNotification

type UserFirebaseNotification struct {
	UserId       bson.ObjectId `json:"user_id"`
	RelatedId    bson.ObjectId `json:"related_id"`
	RelatedExtra string        `bson:"related_extra" json:"related_extra"`
	Position     string        `bson:"position,omitempty" json:"position,omitempty"`
	Title        string        `json:"title,omitempty"`
	Username     string        `json:"username,omitempty"`
	Text         string        `json:"text"`
	Related      string        `json:"related"`
	Seen         bool          `json:"seen"`
	Image        string        `json:"image"`
	Created      time.Time     `json:"created_at"`
	Updated      time.Time     `json:"updated_at"`
}

type UserFirebaseNotifications

type UserFirebaseNotifications struct {
	Count int                                 `json:"count"`
	List  map[string]UserFirebaseNotification `json:"list,omitempty"`
}

type UserFollowing

type UserFollowing struct {
	Id            bson.ObjectId `bson:"_id,omitempty" json:"id"`
	Follower      bson.ObjectId `bson:"follower,omitempty" json:"follower"`
	Following     bson.ObjectId `bson:"following,omitempty" json:"following"`
	Notifications bool          `bson:"notifications,omitempty" json:"notifications"`
	Created       time.Time     `bson:"created_at" json:"created_at"`
}

type UserGaming

type UserGaming struct {
	Swords  int `bson:"swords" json:"swords"`
	Tribute int `bson:"tribute" json:"tribute"`
	Shit    int `bson:"shit" json:"shit"`
	Coins   int `bson:"coins" json:"coins"`
	Level   int `bson:"level" json:"level"`
}

type UserPc

type UserPc struct {
	Type string `bson:"type" json:"type"`
}

type UserProfileForm

type UserProfileForm struct {
	UserName    string `json:"username,omitempty"`
	Description string `json:"description,omitempty"`
	Password    string `json:"password,omitempty"`
	OPassword   string `json:"old_password,omitempty"`

	Email string `json:"email,omitempty"`

	Phone       string `json:"phone,omitempty"`
	Country     string `json:"country,omitempty"`
	OriginId    string `json:"origin_id,omitempty"`
	BattlenetId string `json:"battlenet_id,omitempty"`
	SteamId     string `json:"steam_id,omitempty"`
}

type UserRegisterForm

type UserRegisterForm struct {
	UserName string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
	Email    string `json:"email" binding:"required"`
	Referral string `json:"ref"`
}

type UserRole

type UserRole struct {
	Name       string          `bson:"name" json:"name"`
	Categories []bson.ObjectId `bson:"categories,omitempty" json:"categories,omitempty"`
}

type UserStats

type UserStats struct {
	Saw int `bson:"saw,omitempty" json:"saw,omitempty"`
}

type UserSubscribe

type UserSubscribe struct {
	Id       bson.ObjectId `bson:"_id,omitempty" json:"id"`
	Category string        `bson:"category" json:"category"`
	Email    string        `bson:"email" json:"email"`
}

type UserSubscribeForm

type UserSubscribeForm struct {
	Category string `json:"category" binding:"required"`
	Email    string `json:"email" binding:"required"`
}

type UserToken

type UserToken struct {
	Id      bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	UserId  bson.ObjectId `bson:"user_id" json:"user_id"`
	Token   string        `bson:"token" json:"token"`
	Closed  bool          `bson:"closed,omitempty" json"closed,omitempty"`
	Created time.Time     `bson:"created_at" json:"created_at"`
	Updated time.Time     `bson:"updated_at" json:"updated_at"`
}

type Vote

type Vote struct {
	Id         bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	UserId     bson.ObjectId `bson:"user_id" json:"user_id"`
	Type       string        `bson:"type" json:"type"`
	NestedType string        `bson:"nested_type,omitempty" json:"nested_type,omitempty"`
	RelatedId  bson.ObjectId `bson:"related_id" json:"related_id"`
	Value      int           `bson:"value" json:"value"`
	Created    time.Time     `bson:"created_at" json:"created_at"`
}

type VoteCommentForm

type VoteCommentForm struct {
	Comment   string `json:"comment" binding:"required"`
	Direction string `json:"direction" binding:"required"`
}

type VoteForm

type VoteForm struct {
	Component string `json:"component" binding:"required"`
	Direction string `json:"direction" binding:"required"`
}

type VotePostForm

type VotePostForm struct {
	Direction string `json:"direction" binding:"required"`
}

type Votes

type Votes struct {
	Up     int `bson:"up" json:"up"`
	Down   int `bson:"down" json:"down"`
	Rating int `bson:"rating,omitempty" json:"rating,omitempty"`
}

Jump to

Keyboard shortcuts

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