teldrive/pkg/models/share.go

16 lines
493 B
Go
Raw Normal View History

2024-09-15 02:00:32 +08:00
package models
import (
"time"
)
type FileShare struct {
ID string `gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
FileID string `gorm:"type:uuid;not null"`
Password *string `gorm:"type:text"`
ExpiresAt *time.Time `gorm:"type:timestamp"`
CreatedAt time.Time `gorm:"type:timestamp;not null;default:current_timestamp"`
UpdatedAt time.Time `gorm:"type:timestamp;not null;default:current_timestamp"`
UserID int64 `gorm:"type:bigint;not null"`
}