all repos

onasty @ dfbb8b4

a one-time notes service

onasty/internal/dtos/note.go (view raw)

Smirnov Oleksandr Smirnov Oleksandr
ss2316544@gmail.com
feat: notes manipulations for the note authors (#117)..., 1 year ago
1
package dtos
2
3
import (
4
	"time"
5
6
	"github.com/gofrs/uuid/v5"
7
)
8
9
type NoteSlug = string
10
11
type GetNote struct {
12
	Content   string
13
	ReadAt    time.Time
14
	CreatedAt time.Time
15
	ExpiresAt time.Time
16
}
17
18
type CreateNote struct {
19
	Content              string
20
	UserID               uuid.UUID
21
	Slug                 NoteSlug
22
	BurnBeforeExpiration bool
23
	Password             string
24
	CreatedAt            time.Time
25
	ExpiresAt            time.Time
26
}
27
28
type NoteDetailed struct {
29
	Content              string
30
	Slug                 NoteSlug
31
	BurnBeforeExpiration bool
32
	HasPassword          bool
33
	CreatedAt            time.Time
34
	ExpiresAt            time.Time
35
	ReadAt               time.Time
36
}
37
38
type PatchNote struct {
39
	ExpiresAt            *time.Time
40
	BurnBeforeExpiration *bool
41
}