all repos

onasty @ fa8001ef7b978b20df8dba33a04af109a2b5b18e

a one-time notes service

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package dtos

import (
	"time"

	"github.com/gofrs/uuid/v5"
)

type NoteSlugDTO = string

type NoteDTO struct {
	Content              string
	Slug                 string
	BurnBeforeExpiration bool
	Password             string
	IsRead               bool
	ReadAt               *time.Time
	CreatedAt            time.Time
	ExpiresAt            time.Time
}

type CreateNoteDTO struct {
	Content              string
	UserID               uuid.UUID
	Slug                 string
	BurnBeforeExpiration bool
	Password             string
	CreatedAt            time.Time
	ExpiresAt            time.Time
}