db, handlers, and interfaces
This commit is contained in:
18
models/todo.go
Normal file
18
models/todo.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package models
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
type Todo struct {
|
||||
Id uuid.UUID
|
||||
Name string
|
||||
Done bool
|
||||
}
|
||||
|
||||
func NewTodo(name string, done bool) Todo {
|
||||
return Todo{
|
||||
Id: uuid.New(),
|
||||
Name: name,
|
||||
Done: done,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user