all repos

onasty @ 9b80ecc60c86c123c04b876056720107d7cefc86

a one-time notes service

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

Smirnov Oleksandr Smirnov Oleksandr
ss2316544@gmail.com
feat: add password support to notes (#41)..., 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
	CreatedAt            time.Time
17
	ExpiresAt            time.Time
18
}
19
20
type CreateNoteDTO struct {
21
	Content              string
22
	UserID               uuid.UUID
23
	Slug                 string
24
	BurnBeforeExpiration bool
25
	Password             string
26
	CreatedAt            time.Time
27
	ExpiresAt            time.Time
28
}