Commit 1f5dc7a9 authored by Lukas Böhm's avatar Lukas Böhm 🎱
Browse files

Update database.go

parent 303eee61
......@@ -12,15 +12,15 @@ import (
// Share has many Attachments, ShareID is the foreign key
type Share struct {
ID uuid.UUID `json:"id" gorm:"type:uuid; primary_key"`
Name string `json:"name"`
Name string `json:"name,omitempty"`
Expires *time.Time `json:"expires,omitempty"`
DownloadLimit uint `json:"downloadLimit,omitempty"`
DownloadLimit uint `json:"download_limit,omitempty"`
IsPublic bool `json:"is_public" gorm:"not null; default:false; index"`
Password string `json:"-"`
Email string `json:"email"`
Email string `json:"email,omitempty"`
IsTemporary bool `json:"-" gorm:"not null"`
Attachments []Attachment`json:"files" gorm:"constraint:OnDelete:CASCADE"`
Attachments []Attachment`json:"files,omitempty" gorm:"constraint:OnDelete:CASCADE"`
type Attachment struct {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment