models

package
v0.0.0-...-6e04567 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ROLE_COMPANY string = "COMPANY"
	ROLE_USER    string = "USER"
	ROLE_ADMIN   string = "ADMIN"
)
View Source
const (
	WORKING int8 = iota + 1
	LOOKING
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseAccount

type BaseAccount struct {
	ID       primitive.ObjectID `bson:"_id" json:"_id"`
	Email    string             `bson:"email" json:"email"`
	Password string             `bson:"password" json:"-"`
	Roles    []string           `bson:"roles" json:"roles"`
	Regdate  int64              `bson:"regdate" json:"regdate"`
}

type Company

type Company struct {
	BaseAccount
	CompanyName    string `bson:"companyName" json:"companyName"`
	CompanyWebsite string `bson:"website" json:"website"`
	ContactEmail   string `bson:"contactEmail" json:"contactEmail"`
}

type Offer

type Offer struct {
	ID           primitive.ObjectID `bson:"_id" json:"_id"`
	Title        string             `bson:"title" json:"title"`
	Body         string             `bson:"body" json:"body"`
	Tags         []string           `bson:"tags" json:"tags"`
	Company      Company            `bson:"company" json:"company"`
	City         string             `bson:"city" json:"city"`
	ContactEmail string             `bson:"contactEmail" json:"contactEmail"`
	Website      string             `bson:"website" json:"website"`
	Active       bool               `bson:"active" json:"active"`
}

type User

type User struct {
	BaseAccount
	FirstName string   `bson:"firstName" json:"firstName"`
	LastName  string   `bson:"lastName" json:"lastName"`
	BirthDate int64    `bson:"birthDate" json:"birthDate"`
	City      string   `bson:"city" json:"city"`
	Country   string   `bson:"country" json:"country"`
	Skills    []string `bson:"skills" json:"skills"`
	Status    int8     `bson:"status" json:"status"`
}

Jump to

Keyboard shortcuts

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