goshare/schema/schema.go

38 lines
478 B
Go
Raw Normal View History

2024-01-23 19:13:51 +00:00
package schema
import "time"
type ShareType = int
const (
ShareDrop = iota
ShareSendSingle
ShareSendMultiple
)
type MimeType = int
const (
MimeTypeText = iota
)
type Share struct {
ShareId int
ShareType ShareType
CreatedAt time.Time
ValidUntil time.Time
PasswordHash string
ManagementToken string
Enabled bool
}
type ShareFile struct {
ShareId int
Filename string
Mimetype MimeType
FileHash string
UploadedAt time.Time
Deleted bool
DownloadCount int
}