model

package
v0.0.0-...-bd70580 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity interface {
	IsEntity()
}

type Message

type Message struct {
	ID   string `json:"id"`
	Body string `json:"body"`
}

type TodoItem

type TodoItem struct {
	ID          string    `json:"id" gorm:"type:uuid;default:uuid_generate_v4();primarykey"`
	Description string    `json:"description"`
	DueDate     time.Time `json:"dueDate"`
	FileName    string    `json:"fileName"`

	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

NOTE : as "D" principal of SOLID, abstraction must not has any dependency to technology or low/hig level modules. but for simplicity and also using generic repo layer, gorm tags has been applied in the service model.

func (TodoItem) IsEntity

func (ti TodoItem) IsEntity()

Jump to

Keyboard shortcuts

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