본문으로 건너뛰기

CRUD

Entity

type ToDo struct {
ID uuid.UUID
UserID uuid.UUID
Title string
Category *string
Description string
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time
}

Create(POST)

type CreateToDo struct {
UserID uuid.UUID
Title string
Category *string
Description string
}

Read(GET)

Update(PATCH)

type UpdateToDo struct {
ID uuid.UUID
Title optional.Optional[string]
Category optional.Optional[*string]
Description optional.Optional[string]
}

Delete(DELETE)