models

package
v0.0.0-...-255bcd3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Store *gorm.DB
)

Functions

func AutoMigrate

func AutoMigrate()

func RemoveTask

func RemoveTask(id int64) error

func UpdateTask

func UpdateTask(task Task) error

Types

type Task

type Task struct {
	ID       int64  `gorm:"primaryKey" json:"id"`
	Title    string `gorm:"title" json:"title"`
	Desc     string `gorm:"desc" json:"desc"`
	Finished bool   `gorm:"finished" json:"finished"`
}

Task 任务实体

func ListAllTasks

func ListAllTasks(_finished bool) []Task

func SaveTask

func SaveTask(task Task) (Task, error)

Jump to

Keyboard shortcuts

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