models

package
v0.0.0-...-030c94e Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTask

type CreateTask struct {
	*CreateTaskJson `bson:",inline"`
	UserEmail       string    `bson:"user_email" json:"user_email"`
	CreatedAt       time.Time `bson:"created_at" json:"created_at"`
}

CreateTask ...

type CreateTaskJson

type CreateTaskJson struct {
	Title       string    `bson:"title" json:"title" valid:"required"`
	Description string    `bson:"description" json:"description" valid:"required"`
	WaitBefore  time.Time `bson:"wait_before" json:"wait_before" valid:"required"`
}

CreateTaskJson for creating new tasks

type CreateUser

type CreateUser struct {
	Email string `bson:"email" json:"email"  valid:"required,email"`
	Login string `bson:"login" json:"login" valid:"required"`
}

CreateUser for creating new users

type Task

type Task struct {
	*CreateTask `bson:",inline"`
	ID          primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	Notificated bool               `bson:"notifcated" json:"notifcated"`
	Done        bool               `bson:"done" json:"done"`
}

Task model

func (*Task) String

func (u *Task) String() string

type UpdateTaskJson

type UpdateTaskJson struct {
	Title       string    `bson:"title" json:"title,omitempty"`
	Description string    `bson:"description" json:"description,omitempty"`
	WaitBefore  time.Time `bson:"wait_before" json:"wait_before,omitempty"`
}

UpdateTaskJson ...

type User

type User struct {
	*CreateUser `bson:",inline"`
	ID          primitive.ObjectID   `bson:"_id,omitempty" json:"id"`
	Tasks       []primitive.ObjectID `bson:"tasks" json:"tasks"`
}

User model

func (*User) String

func (u *User) String() string

Jump to

Keyboard shortcuts

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