schema

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cat

type Cat struct {
	ID              int       `db:"id"`
	Name            string    `db:"name"`
	ExperienceYears int16     `db:"experience_years"`
	Breed           string    `db:"breed"`
	Salary          int       `db:"salary"`
	CreatedAt       time.Time `db:"created_at"`
	UpdatedAt       time.Time `db:"updated_at"`
}

func (Cat) ToModel

func (c Cat) ToModel() *models.Cat

type Mission

type Mission struct {
	ID            int       `db:"id"`
	AssignedCatID *int      `db:"assigned_cat_id"`
	IsCompleted   bool      `db:"is_completed"`
	CreatedAt     time.Time `db:"created_at"`
	UpdatedAt     time.Time `db:"updated_at"`
}

func (Mission) ToModel

func (m Mission) ToModel() *models.Mission

type Note

type Note struct {
	ID        int       `db:"mission_id"`
	TargetID  int       `db:"target_id"`
	Content   string    `db:"content"`
	CreatedAt time.Time `db:"created_at"`
}

func (Note) ToModel

func (n Note) ToModel() *models.Note

type Target

type Target struct {
	ID          int       `db:"id"`
	MissionID   int       `db:"mission_id"`
	IsCompleted bool      `db:"is_completed"`
	Name        string    `db:"name"`
	Country     string    `db:"country"`
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
}

func (Target) ToModel

func (t Target) ToModel() *models.Target

Jump to

Keyboard shortcuts

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