schema

package
v0.0.0-...-d523446 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Invitation

type Invitation string

Invitation ...

const (
	//PendingInvitation ...
	PendingInvitation Invitation = "Pending"

	//AcceptedInvitation ...
	AcceptedInvitation Invitation = "Accepted"

	//DeclinedInvitation ...
	DeclinedInvitation Invitation = "Declined"
)

type Member

type Member struct {
	UserID     string     `bson:"user_id"`
	UserName   string     `bson:"username"`
	Role       MemberRole `bson:"role"`
	Invitation Invitation `bson:"invitation"`
}

Member ...

func (*Member) GetOutputMember

func (member *Member) GetOutputMember() *model.Member

GetOutputMember ...

type MemberRole

type MemberRole string

MemberRole ...

const (
	//RoleOwner ...
	RoleOwner MemberRole = "Owner"

	//RoleEditor ...
	RoleEditor MemberRole = "Editor"

	//RoleViewer ...
	RoleViewer MemberRole = "Viewer"
)

type Project

type Project struct {
	ID        string    `bson:"_id"`
	Name      string    `bson:"name"`
	Members   []*Member `bson:"members"`
	State     *string   `bson:"state"`
	CreatedAt string    `bson:"created_at"`
	UpdatedAt string    `bson:"updated_at"`
	RemovedAt string    `bson:"removed_at"`
}

Project ...

func (*Project) GetOutputMembers

func (project *Project) GetOutputMembers() []*model.Member

GetOutputMembers ...

func (*Project) GetOutputProject

func (project *Project) GetOutputProject() *model.Project

GetOutputProject ...

type User

type User struct {
	ID              string  `bson:"_id"`
	Username        string  `bson:"username"`
	Email           *string `bson:"email"`
	IsEmailVerified *bool   `bson:"is_email_verified"`
	CompanyName     *string `bson:"company_name"`
	Name            *string `bson:"name"`
	Role            *string `bson:"role"`
	State           *string `bson:"state"`
	CreatedAt       string  `bson:"created_at"`
	UpdatedAt       string  `bson:"updated_at"`
	RemovedAt       string  `bson:"removed_at"`
}

User ...

func (User) GetOutputUser

func (user User) GetOutputUser() *model.User

GetOutputUser ...

Jump to

Keyboard shortcuts

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