model

package
v0.0.0-...-04ccc7c Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: AGPL-3.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressInfo

type AddressInfo struct {
	Country    string `json:"Country" bson:"country"`
	City       string `json:"City" bson:"city"`
	Address    string `json:"Address" bson:"address"`
	Address2   string `json:"Address2" bson:"address2"`
	Region     string `json:"Region" bson:"region"`
	PostalCode string `json:"PostalCode" bson:"postalCode"`
}

type Like

type Like struct {
	UserID   string `json:"UserID" bson:"user_id"`
	EntityID string `json:"EntityID" bson:"entity_id"`
}

type MailSubscription

type MailSubscription struct {
	Email  string    `bson:"email"`
	UserID string    `bson:"user_id"`
	Joined time.Time `bson:"joined"`
}

type PaymentInfo

type PaymentInfo struct {
	CardNumber  string      `json:"CardNumber" bson:"card_number"`
	Expires     YearMonth   `json:"Expires" bson:"expires"`
	CVV         string      `json:"CVV" bson:"cvv"`
	BillingInfo AddressInfo `json:"BillingInfo" bson:"billing_info"`
}

type RemoteAuth

type RemoteAuth struct {
	UserID   string       `bson:"user_id"`
	RemoteID string       `bson:"remote_id"`
	Provider UserProvider `bson:"provider"`
}

type User

type User struct {
	UniqueID           string                  `json:"UniqueID" bson:"unique_id"`
	Username           string                  `json:"Username" bson:"username"`
	UsernameN          string                  `json:"UsernameN" bson:"username_n"`
	Email              string                  `json:"Email" bson:"email"`
	EmailN             string                  `json:"EmailN" bson:"email_n"`
	PasswordHash       string                  `json:"PasswordHash" bson:"password_hash"`
	FirstName          string                  `json:"FirstName" bson:"first_name"`
	LastName           string                  `json:"LastName" bson:"last_name"`
	PhoneNumber        string                  `json:"PhoneNumber" bson:"phone_number"`
	Avatar             string                  `json:"Avatar" bson:"avatar"`
	Location           string                  `json:"Location" bson:"location"`
	PaymentInfo        PaymentInfo             `json:"PaymentInfo" bson:"payment_info"`
	Liked              []string                `json:"Liked,omitempty" bson:"liked,omitempty"`
	Settings           UserSettings            `json:"Settings,omitempty" bson:"settings,omitempty"`
	Confirmed          bool                    `json:"Confirmed" bson:"confirmed"`
	Role               UserRole                `json:"Role" bson:"role"`
	RegisterDate       time.Time               `json:"RegisterDate" bson:"register_date"`
	Provider           UserProvider            `json:"Provider" bson:"provider"`
	ConnectedProviders map[UserProvider]string `json:"ConnectedProviders" bson:"-"`
}

type UserProvider

type UserProvider string
var (
	Internal UserProvider = ""
	Facebook UserProvider = "facebook"
	Google   UserProvider = "google"
	GitHub   UserProvider = "github"
	Apple    UserProvider = "apple"
)

type UserRole

type UserRole string
var (
	Regular UserRole = ""
	Admin   UserRole = "adm"
	Guest   UserRole = "gst"
)

type UserSettings

type UserSettings struct {
	Theme      string `json:"Theme" bson:"theme"`
	LayoutView string `json:"LayoutView" bson:"layout_view"`
}

type YearMonth

type YearMonth struct {
	Year  int32
	Month int32
}

Jump to

Keyboard shortcuts

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