model

package
v0.0.0-...-b7dbb59 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Todo

type Todo struct {
	ID        string    `json:"id,omitempty" bson:"_id"`
	Title     string    `json:"title,omitempty" bson:"title"`
	Done      bool      `json:"done,omitempty" bson:"done"`
	CreatedBy string    `json:"created_by,omitempty" bson:"created_by"`
	UpdatedAt time.Time `json:"updated_at,omitempty" bson:"updated_at"`
}

Todo is the aggregate root of the todo domain

func NewTodo

func NewTodo(title string) (*Todo, error)

NewTodo is to create a new todo

func (*Todo) FlexContainer

func (x *Todo) FlexContainer() (messaging_api.FlexContainerInterface, error)

FlexContainer returns the issue as a flex message.

type Todos

type Todos []*Todo

Todos is a collection of Todo.

func (Todos) FlexContainer

func (x Todos) FlexContainer() (messaging_api.FlexContainerInterface, error)

FlexContainer returns the issues as a flex message.

Jump to

Keyboard shortcuts

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