feat: implement task respository

This commit is contained in:
2026-03-29 22:18:24 -05:00
parent d0d32736a6
commit a49fd2d0d7
3 changed files with 181 additions and 5 deletions

View File

@@ -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"`
}