feat: implement task respository
This commit is contained in:
@@ -6,10 +6,15 @@ import (
|
||||
)
|
||||
|
||||
type Task struct {
|
||||
Id int `json:"id"`
|
||||
Text string `json:"text"`
|
||||
Completed bool `json:"completed"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updated_at"`
|
||||
Id int `db:"id" json:"id"`
|
||||
Text string `db:"text" json:"text"`
|
||||
Completed bool `db:"completed" json:"completed"`
|
||||
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updated_at"`
|
||||
// UpdatedAt pgtype.Timestamptz `json:"updated_at"` /* evaluar la posibilidad de utilizarlo */
|
||||
}
|
||||
|
||||
type UpdateTaskInput struct {
|
||||
Text *string `json:"text"`
|
||||
Completed *bool `json:"completed"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user