21 lines
554 B
Go
21 lines
554 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
// "github.com/jackc/pgx/v5/pgtype"
|
|
)
|
|
|
|
type Task struct {
|
|
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"`
|
|
}
|