schema

package
v0.0.0-...-0ca97f1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthoredReview

type AuthoredReview struct {
	Review       Review
	Author       User
	Helpful      bool
	HelpfulCount int64
}

type Feed

type Feed struct {
	Page   int64   `bson:"page"`
	SortBy string  `bson:"sortby"`
	Models []Model `bson:"models"`
}

type Helpful

type Helpful struct {
	UserId   primitive.ObjectID `bson:"userid"`
	ReviewId primitive.ObjectID `bson:"reviewid"`
}

type Membership

type Membership struct {
	Type       string   `json:"type"`
	Price      int64    `json:"price"`
	Period     string   `json:"period"`
	Features   []string `json:"features"`
	Url        string   `json:"url"`
	ButtonType string   `json:"buttonType"`
	ButtonText string   `json:"buttonText"`
}

type Method

type Method struct {
	ObjectId    primitive.ObjectID `bson:"_id"`
	Name        string             `bson:"name"`
	Flatname    string             `bson:"flatname"`
	Description string             `bson:"description"`
	CreatedAt   primitive.DateTime `bson:"createdat"`
	UpdatedAt   primitive.DateTime `bson:"updatedat"`
}

type Model

type Model struct {
	ObjectId    primitive.ObjectID `bson:"_id"`
	CategoryId  primitive.ObjectID `bson:"categoryid"`
	Name        string             `bson:"name"`
	Flatname    string             `bson:"flatname"`
	ReviewCount int64              `bson:"reviewcount"`
	TestCount   int64              `bson:"testcount"`
	Companies   []string           `bson:"companies"`
	CreatedAt   primitive.DateTime `bson:"createdat"`
	UpdatedAt   primitive.DateTime `bson:"updatedat"`
	Content     template.HTML      `bson:"content"`
}

func (Model) Increment

func (m Model) Increment(i int64) int64

func (Model) IsLast

func (m Model) IsLast(i int) bool

func (Model) IsLastReview

func (m Model) IsLastReview(i int) bool

type Review

type Review struct {
	ObjectId     primitive.ObjectID `bson:"_id"`
	ModelId      primitive.ObjectID `bson:"modelid"`
	UserId       primitive.ObjectID `bson:"userid"`
	Comment      string             `bson:"comment"`
	CreatedAt    int64              `bson:"createdat"`
	UpdatedAt    int64              `bson:"updatedat"`
	HelpfulCount int64              `bson:"helpfulcount"`
}

func (Review) ParseDate

func (r Review) ParseDate() string

type ReviewFeed

type ReviewFeed struct {
	Reviews []Review
	Page    int64  `bson:"page"`
	SortBy  string `bson:"sortby"`
}

type Test

type Test struct {
	ObjectId         primitive.ObjectID `bson:"_id"`
	ModelId          primitive.ObjectID `bson:"modelid"`
	MethodId         primitive.ObjectID `bson:"methodid"`
	UserId           primitive.ObjectID `bson:"userid"`
	Project          string             `bson:"project"`
	Title            string             `bson:"title"`
	StartDate        primitive.DateTime `bson:"startdate"`
	EndDate          primitive.DateTime `bson:"enddate"`
	Status           string             `bson:"status"`
	State            string             `bson:"state"`
	TargetAudience   string             `bson:"targetaudience"`
	ProblemStatement string             `bson:"problemstatement"`
	ProposedSolution string             `bson:"proposedsolution"`
	KPI              string             `bson:"kpi"`
	SuccessCriteria  float64            `bson:"successcriteria"`
	Completed        bool               `bson:"completed"`
	Result           float64            `bson:"result"`
	CreatedAt        primitive.DateTime `bson:"createdat"`
	UpdatedAt        primitive.DateTime `bson:"updatedat"`
}

type User

type User struct {
	ObjectId      primitive.ObjectID `bson:"_id"`
	Name          string             `bson:"name"`
	Avatar        string             `bson:"avatar"`
	Company       string             `bson:"company"`
	Email         string             `bson:"email"`
	Website       string             `bson:"website"`
	Socials       []string           `bson:"socials"`
	Membership    bool               `bson:"membership"`
	MembershipAt  int64              `bson:"membershipat"`
	MembershipEnd int64              `bson:"membershipend"`
	StripeId      string             `bson:"stripeid"`
	CreatedAt     int64              `bson:"createdat"`
	UpdatedAt     int64              `bson:"updatedat"`
	DeactivatedAt int64              `bson:"deactivatedat"`
	NewsModel     bool               `bson:"newsmodel"`
	NewsMethod    bool               `bson:"newsmethod"`
}

func (*User) GetInitial

func (u *User) GetInitial() string

Jump to

Keyboard shortcuts

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