model

package
v0.0.0-...-0406d23 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientCollection     = "clients"
	InvitationCollection = "invitations"
	PermissionCollection = "permissions"
	RoleCollection       = "roles"
	KeyCollection        = "keys"
	UserCollection       = "users"
)

Variables

Functions

This section is empty.

Types

type Board

type Board struct {
	Model        `bson:",inline"`
	UID          primitive.ObjectID  `json:"uid" bson:"uid"`
	Organization *primitive.ObjectID `json:"organization,omitempty" bson:"organization,omitempty"`
	Portfolio    *primitive.ObjectID `json:"portfolio,omitempty" bson:"portfolio,omitempty"`
	Type         string              `json:"type" bson:"type"`
	Title        string              `json:"title" bson:"title"`
	Description  *string             `json:"description,omitempty" bson:"description,omitempty"`
	IsTemplate   bool                `json:"is_template,omitempty" bson:"is_template,omitempty"`
	End          *primitive.DateTime `json:"end,omitempty" bson:"end,omitempty"`
	Starred      bool                `json:"starred,omitempty" bson:"starred,omitempty"`
	Background   string              `json:"background,omitempty" bson:"background,omitempty"`
	Order        *int                `json:"order,omitempty" bson:"order,omitempty"`
	Status       string              `json:"status" bson:"status"`
}

func (*Board) Collection

func (i *Board) Collection() string

func (*Board) Index

func (i *Board) Index() []mongo.IndexModel

func (Board) IsEntity

func (Board) IsEntity()

func (*Board) MarshalBSON

func (i *Board) MarshalBSON() ([]byte, error)

type BoardType

type BoardType string
const (
	BoardTypeRequest   BoardType = "REQUEST"
	BoardTypeSales     BoardType = "SALES"
	BoardTypeProject   BoardType = "PROJECT"
	BoardTypeMarketing BoardType = "MARKETING"
)

func (BoardType) IsValid

func (e BoardType) IsValid() bool

func (BoardType) MarshalGQL

func (e BoardType) MarshalGQL(w io.Writer)

func (BoardType) String

func (e BoardType) String() string

func (*BoardType) UnmarshalGQL

func (e *BoardType) UnmarshalGQL(v interface{}) error

type Boards

type Boards struct {
	Data  []*Board `json:"data,omitempty"`
	Count int      `json:"count"`
}

type Collaborator

type Collaborator struct {
	Model      `bson:",inline"`
	UID        primitive.ObjectID `json:"uid" bson:"uid"`
	Board      primitive.ObjectID `json:"board,omitempty" bson:"board,omitempty"`
	Permission string             `json:"permission" bson:"permission"`
	Status     string             `json:"status" bson:"status"`
}

func (*Collaborator) Collection

func (i *Collaborator) Collection() string

func (*Collaborator) Index

func (i *Collaborator) Index() []mongo.IndexModel

func (Collaborator) IsEntity

func (Collaborator) IsEntity()

func (*Collaborator) MarshalBSON

func (i *Collaborator) MarshalBSON() ([]byte, error)

type Comment

type Comment struct {
	ID string `json:"id"`
}

func (Comment) IsEntity

func (Comment) IsEntity()

type Goal

type Goal struct {
	Model        `bson:",inline"`
	UID          primitive.ObjectID  `bson:"uid" json:"uid"`
	Parent       *primitive.ObjectID `json:"parent,omitempty" bson:"parent,omitempty"`
	Organization *primitive.ObjectID `json:"organization,omitempty" bson:"organization,omitempty"`
	Time         primitive.ObjectID  `json:"time" bson:"time"`
	Name         string              `json:"name" bson:"name"`
	Notes        *string             `json:"notes,omitempty" bson:"notes,omitempty"`
	Start        *primitive.DateTime `json:"start,omitempty" bson:"start,omitempty"`
	End          *primitive.DateTime `json:"end,omitempty" bson:"end,omitempty"`
	Status       string              `json:"status" bson:"status"`
}

func (*Goal) Collection

func (i *Goal) Collection() string

func (*Goal) Index

func (i *Goal) Index() []mongo.IndexModel

func (*Goal) MarshalBSON

func (i *Goal) MarshalBSON() ([]byte, error)

type GoalStatus

type GoalStatus string
const (
	GoalStatusInProgress GoalStatus = "IN_PROGRESS"
	GoalStatusCompleted  GoalStatus = "COMPLETED"
	GoalStatusOnHold     GoalStatus = "ON_HOLD"
	GoalStatusCanceled   GoalStatus = "CANCELED"
)

func (GoalStatus) IsValid

func (e GoalStatus) IsValid() bool

func (GoalStatus) MarshalGQL

func (e GoalStatus) MarshalGQL(w io.Writer)

func (GoalStatus) String

func (e GoalStatus) String() string

func (*GoalStatus) UnmarshalGQL

func (e *GoalStatus) UnmarshalGQL(v interface{}) error

type Goals

type Goals struct {
	Count int     `json:"count"`
	Data  []*Goal `json:"data,omitempty"`
}

type List

type List struct {
	Model  `bson:",inline"`
	UID    primitive.ObjectID `json:"uid" bson:"uid"`
	Board  primitive.ObjectID `json:"board" bson:"board"`
	Name   string             `json:"name" bson:"name"`
	Order  int                `json:"order" bson:"order"`
	Status string             `json:"status" bson:"status"`
}

func (*List) Collection

func (i *List) Collection() string

func (*List) Index

func (i *List) Index() []mongo.IndexModel

func (*List) MarshalBSON

func (i *List) MarshalBSON() ([]byte, error)

type Lists

type Lists struct {
	Count int     `json:"count"`
	Data  []*List `json:"data,omitempty"`
}

type Metric

type Metric struct {
	Precision *int     `json:"precision,omitempty"`
	Unit      *string  `json:"unit,omitempty"`
	Initial   *float64 `json:"initial,omitempty"`
	Target    *float64 `json:"target,omitempty"`
	Current   *float64 `json:"current,omitempty"`
	Source    *string  `json:"source,omitempty"`
}

type Model

type Model struct {
	ID        primitive.ObjectID  `json:"id,omitempty" bson:"_id,omitempty"`
	Metadata  primitive.M         `json:"metadata,omitempty" bson:"metadata,omitempty"`
	Created   primitive.Timestamp `json:"created,omitempty" bson:"created,omitempty"`
	Updated   primitive.Timestamp `json:"updated,omitempty" bson:"updated,omitempty"`
	Deleted   primitive.Timestamp `json:"deleted,omitempty" bson:"deleted,omitempty"`
	Timestamp primitive.Timestamp `json:"timestamp,omitempty" bson:"timestamp,omitempty"`
}

type NewBoard

type NewBoard struct {
	Portfolio   *string                `json:"portfolio,omitempty"`
	Type        *string                `json:"type,omitempty"`
	Title       string                 `json:"title"`
	Description *string                `json:"description,omitempty"`
	End         *string                `json:"end,omitempty"`
	IsTemplate  *bool                  `json:"is_template,omitempty"`
	Background  *string                `json:"background,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
	Starred     *bool                  `json:"starred,omitempty"`
	Order       *int                   `json:"order,omitempty"`
	Status      *string                `json:"status,omitempty"`
	UID         *string                `json:"uid,omitempty"`
}

type NewGoal

type NewGoal struct {
	Name         string                 `json:"name"`
	Start        *string                `json:"start,omitempty"`
	End          *string                `json:"end,omitempty"`
	Notes        *string                `json:"notes,omitempty"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
	Status       *string                `json:"status,omitempty"`
	Parent       *string                `json:"parent,omitempty"`
	Phase        string                 `json:"phase"`
	UID          string                 `json:"uid"`
	Organization *string                `json:"organization,omitempty"`
}

type NewList

type NewList struct {
	Name     string                 `json:"name"`
	Board    string                 `json:"board"`
	Tasks    []*string              `json:"tasks,omitempty"`
	Order    *int                   `json:"order,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type NewPortfolio

type NewPortfolio struct {
	Name        string                 `json:"name"`
	Color       string                 `json:"color"`
	Description *string                `json:"description,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type NewTask

type NewTask struct {
	User      *string                `json:"user,omitempty"`
	Parent    *string                `json:"parent,omitempty"`
	Assignee  *string                `json:"assignee,omitempty"`
	Shares    []string               `json:"shares,omitempty"`
	Name      string                 `json:"name"`
	Notes     *string                `json:"notes,omitempty"`
	Priority  *string                `json:"priority,omitempty"`
	Start     *string                `json:"start,omitempty"`
	End       *string                `json:"end,omitempty"`
	Order     *int                   `json:"order,omitempty"`
	List      string                 `json:"list"`
	Completed *bool                  `json:"completed,omitempty"`
	Status    *string                `json:"status,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

type NewTime

type NewTime struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	StartDate   string                 `json:"start_date"`
	EndDate     string                 `json:"end_date"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type Phase

type Phase struct {
	Model       `bson:",inline"`
	Parent      *primitive.ObjectID `json:"parent,omitempty" bson:"parent,omitempty"`
	Name        string              `json:"name" bson:"name"`
	Description string              `json:"description,omitempty" bson:"description,omitempty"`
	Start       primitive.DateTime  `json:"start" bson:"start"`
	End         primitive.DateTime  `json:"end" bson:"end"`
}

func (*Phase) Collection

func (i *Phase) Collection() string

func (*Phase) Index

func (i *Phase) Index() []mongo.IndexModel

func (*Phase) MarshalBSON

func (i *Phase) MarshalBSON() ([]byte, error)

type Portfolio

type Portfolio struct {
	Model       `bson:",inline"`
	UID         primitive.ObjectID `json:"uid" bson:"uid"`
	Name        string             `json:"name" bson:"name"`
	Color       string             `json:"color" bson:"color"`
	Description *string            `json:"description,omitempty" bson:"description,omitempty"`
	Status      string             `json:"status" bson:"status"`
}

func (*Portfolio) Collection

func (i *Portfolio) Collection() string

func (*Portfolio) Index

func (i *Portfolio) Index() []mongo.IndexModel

func (*Portfolio) MarshalBSON

func (i *Portfolio) MarshalBSON() ([]byte, error)

type Portfolios

type Portfolios struct {
	Data  []*Portfolio `json:"data,omitempty"`
	Count int          `json:"count"`
}

type Task

type Task struct {
	Model     `bson:",inline"`
	UID       primitive.ObjectID    `json:"uid" bson:"uid"`
	Assignee  *primitive.ObjectID   `json:"assignee,omitempty" bson:"assignee,omitempty"`
	Parent    *primitive.ObjectID   `json:"parent,omitempty" bson:"parent,omitempty"`
	List      *primitive.ObjectID   `json:"list,omitempty" bson:"list,omitempty"`
	Name      string                `json:"name" bson:"name"`
	Notes     *string               `json:"notes,omitempty" bson:"notes,omitempty"`
	Priority  *string               `json:"priority,omitempty" bson:"priority,omitempty"`
	Start     *primitive.DateTime   `json:"start" bson:"start"`
	End       *primitive.DateTime   `json:"end,omitempty" bson:"end,omitempty"`
	Order     *int                  `json:"order,omitempty" bson:"order,omitempty"`
	Completed bool                  `json:"completed,omitempty" bson:"completed,omitempty"`
	Status    string                `json:"status" bson:"status"`
	Shares    []*primitive.ObjectID `json:"shares,omitempty" bson:"shares,omitempty"`
}

func (*Task) Collection

func (i *Task) Collection() string

func (*Task) Index

func (i *Task) Index() []mongo.IndexModel

func (Task) IsEntity

func (Task) IsEntity()

func (*Task) MarshalBSON

func (i *Task) MarshalBSON() ([]byte, error)

type TaskStatus

type TaskStatus string
const (
	TaskStatusPublic   TaskStatus = "PUBLIC"
	TaskStatusPrivate  TaskStatus = "PRIVATE"
	TaskStatusArchived TaskStatus = "ARCHIVED"
)

func (TaskStatus) IsValid

func (e TaskStatus) IsValid() bool

func (TaskStatus) MarshalGQL

func (e TaskStatus) MarshalGQL(w io.Writer)

func (TaskStatus) String

func (e TaskStatus) String() string

func (*TaskStatus) UnmarshalGQL

func (e *TaskStatus) UnmarshalGQL(v interface{}) error

type Tasks

type Tasks struct {
	Data  []*Task `json:"data,omitempty"`
	Count int     `json:"count"`
}

type Times

type Times struct {
	Data  []*Phase `json:"data,omitempty"`
	Count int      `json:"count"`
}

type UpdateBoard

type UpdateBoard struct {
	Portfolio   *string                `json:"portfolio,omitempty"`
	Type        *string                `json:"type,omitempty"`
	Title       *string                `json:"title,omitempty"`
	Description *string                `json:"description,omitempty"`
	End         *string                `json:"end,omitempty"`
	IsTemplate  *bool                  `json:"is_template,omitempty"`
	Background  *string                `json:"background,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
	Starred     *bool                  `json:"starred,omitempty"`
	Order       *int                   `json:"order,omitempty"`
	Status      *string                `json:"status,omitempty"`
	UID         *string                `json:"uid,omitempty"`
}

type UpdateGoal

type UpdateGoal struct {
	Name         *string                `json:"name,omitempty"`
	Start        *string                `json:"start,omitempty"`
	End          *string                `json:"end,omitempty"`
	Notes        *string                `json:"notes,omitempty"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
	Status       *string                `json:"status,omitempty"`
	Parent       *string                `json:"parent,omitempty"`
	Phase        *string                `json:"phase,omitempty"`
	UID          *string                `json:"uid,omitempty"`
	Organization *string                `json:"organization,omitempty"`
}

type UpdateList

type UpdateList struct {
	Board    *string                `json:"board,omitempty"`
	Name     *string                `json:"name,omitempty"`
	Tasks    []*string              `json:"tasks,omitempty"`
	Order    *int                   `json:"order,omitempty"`
	Status   *string                `json:"status,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type UpdatePortfolio

type UpdatePortfolio struct {
	Name        *string                `json:"name,omitempty"`
	Color       *string                `json:"color,omitempty"`
	Description *string                `json:"description,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateTask

type UpdateTask struct {
	User      *string                `json:"user,omitempty"`
	Parent    *string                `json:"parent,omitempty"`
	Assignee  *string                `json:"assignee,omitempty"`
	Shares    []string               `json:"shares,omitempty"`
	Name      *string                `json:"name,omitempty"`
	Notes     *string                `json:"notes,omitempty"`
	Priority  *string                `json:"priority,omitempty"`
	Start     *string                `json:"start,omitempty"`
	End       *string                `json:"end,omitempty"`
	Order     *int                   `json:"order,omitempty"`
	List      *string                `json:"list,omitempty"`
	Completed *bool                  `json:"completed,omitempty"`
	Status    *string                `json:"status,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateTime

type UpdateTime struct {
	Name        *string                `json:"name,omitempty"`
	Description *string                `json:"description,omitempty"`
	StartDate   *string                `json:"start_date,omitempty"`
	EndDate     *string                `json:"end_date,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type User

type User struct {
	ID string `json:"id" bson:"_id"`
}

func (User) IsEntity

func (User) IsEntity()

Jump to

Keyboard shortcuts

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