model

package
v0.0.0-...-02ebfc9 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auction

type Auction struct {
	ID          string  `json:"id" bson:"_id,omitempty"`
	Host        string  `json:"host"`
	Description string  `json:"description"`
	Offer       float64 `json:"offer"`
	Bids        []*Bid  `json:"bids"`
	Timestamp   string  `json:"timestamp"`
	Deadline    string  `json:"deadline"`
}

type Bid

type Bid struct {
	ID        string  `json:"id"`
	Issuer    string  `json:"issuer"`
	Deadline  string  `json:"deadline"`
	Price     float64 `json:"price"`
	Timestamp string  `json:"timestamp"`
	Selected  bool    `json:"selected"`
}

type Chat

type Chat struct {
	ID       string     `json:"id"`
	Users    []string   `json:"users"`
	Messages []*Message `json:"messages"`
}

type Comment

type Comment struct {
	ID        string   `json:"id"`
	Author    string   `json:"author"`
	Text      string   `json:"text"`
	LikeCount int      `json:"likeCount"`
	Likes     []string `json:"likes"`
	Timestamp string   `json:"timestamp"`
}

type CommentList

type CommentList struct {
	List  []*Comment `json:"list"`
	Count int        `json:"count"`
}

type FeedAuction

type FeedAuction struct {
	ID          string    `json:"id"`
	Host        *FeedUser `json:"host"`
	Description string    `json:"description"`
	Offer       float64   `json:"offer"`
	Bids        []*Bid    `json:"bids"`
	Timestamp   string    `json:"timestamp"`
	Deadline    string    `json:"deadline"`
}

type FeedPost

type FeedPost struct {
	ID          string       `json:"id"`
	Author      *FeedUser    `json:"author"`
	Description *string      `json:"description"`
	Content     string       `json:"content"`
	Timestamp   string       `json:"timestamp"`
	Comments    *CommentList `json:"comments"`
	Likes       int          `json:"likes"`
	Liked       bool         `json:"liked"`
	BidID       *string      `json:"bidID"`
}

type FeedUser

type FeedUser struct {
	Nickname string `json:"nickname"`
	Name     string `json:"name"`
	Picture  string `json:"picture"`
}

type Login

type Login struct {
	Token string `json:"token"`
	First bool   `json:"first"`
}

type Message

type Message struct {
	ChatID    string `json:"chatID"`
	Message   string `json:"message"`
	Timestamp string `json:"timestamp"`
	Sender    string `json:"sender"`
}

type NewUser

type NewUser struct {
	Nickname string `json:"nickname"`
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

type Order

type Order struct {
	ID         string  `json:"id"`
	PaymentID  string  `json:"paymentID"`
	PaymentURL string  `json:"paymentURL"`
	PayerID    *string `json:"payerID"`
	AuctionID  string  `json:"auctionID"`
	BidID      string  `json:"bidID"`
	Status     string  `json:"status"`
}

type Post

type Post struct {
	ID          string       `json:"id" bson:"_id,omitempty"`
	Author      string       `json:"author"`
	Description *string      `json:"description"`
	Content     string       `json:"content"`
	Timestamp   string       `json:"timestamp"`
	Comments    *CommentList `json:"comments"`
	LikeCount   int          `json:"likeCount"`
	Likes       []string     `json:"likes"`
	Liked       bool         `json:"liked" bson:"liked,omitempty"`
	BidID       *string      `json:"bidID"`
}

type PostComment

type PostComment struct {
	ID        string    `json:"id"`
	Author    *FeedUser `json:"author"`
	Text      string    `json:"text"`
	Likes     int       `json:"likes"`
	Liked     bool      `json:"liked"`
	Timestamp string    `json:"timestamp"`
}

type User

type User struct {
	Nickname       string   `json:"nickname"`
	Name           string   `json:"name"`
	Email          string   `json:"email"`
	Bio            string   `json:"bio"`
	Picture        string   `json:"picture"`
	Cover          string   `json:"cover"`
	Followers      []string `json:"followers"`
	FollowersCount int      `json:"followersCount"`
	Following      []string `json:"following"`
	Lat            float64  `json:"lat"`
	Lng            float64  `json:"lng"`
}

Jump to

Keyboard shortcuts

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