Skip to content

Data Models

mfreeman451 edited this page Feb 3, 2022 · 18 revisions

Notification Model

type Notification struct {
	Name		string
	Desc            string
	ImageURL	string
	URL		string
}

Chase Model

type Networks struct {
	Name		string
	URL         string
	Tier		int
	Logo		string
	Other		string
}

type Wheels struct {
	W1  string
	W2  string
	W3  string
	W4  string
}

type Sentiment struct {
	Magnitude	float64		`firestore:"magnitude"`
	Score		float64		`firestore:"score"`
}

type Chase struct {
	ID          string    	""
	Name        string    	`firestore:"Name"`
	Desc        string    	`firestore:"Desc"`
	Live        bool      	`firestore:"Live"`
	Networks	[]Networks	`firestore:"Networks"`
	Wheels      Wheels      `firestore:"Wheels"`
	Votes       int       	`firestore:"Votes"`
	CreatedAt   time.Time 	`firestore:"CreatedAt"`
	EndedAt     time.Time 	`firestore:"EndedAt"`
	ImageURL    string      `firestore:"ImageURL"`
	Reddit		string		`firestore:"Reddit"`
	Sentiment	Sentiment
}

Push Tokens

type PushTokens struct {
	Token		string		`json:"token"`
	CreatedAt	time.Time	`json:"created_at"`
	TokenType	string		`json:"type"`
}

User Model

type User struct {
	UID 		string			`firestore:"uid"`
	LastUpdated	time.Time		`firestore:"lastupdated"`
	PhotoURL	string			`firestore:"photourl"`
	UserName	string			`firestore:"username"`
	Tokens		[]PushTokens	`firestore:"tokens"`
}
Clone this wiki locally