all repos

onasty @ 5d72e79

a one-time notes service

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

Smirnov Oleksandr Smirnov Oleksandr
ss2316544@gmail.com
feat: keep metadate on note removal (#96)..., 1 year ago
1
package dtos
2
3
import (
4
	"time"
5
6
	"github.com/gofrs/uuid/v5"
7
)
8
9
type NoteSlugDTO = string
10
11
type NoteDTO struct {
12
	Content              string
13
	Slug                 string
14
	BurnBeforeExpiration bool
15
	Password             string
16
	IsRead               bool
17
	ReadAt               *time.Time
18
	CreatedAt            time.Time
19
	ExpiresAt            time.Time
20
}
21
22
type CreateNoteDTO struct {
23
	Content              string
24
	UserID               uuid.UUID
25
	Slug                 string
26
	BurnBeforeExpiration bool
27
	Password             string
28
	CreatedAt            time.Time
29
	ExpiresAt            time.Time
30
}