teldrive/pkg/models/share.go
2024-09-15 10:03:55 +05:30

15 lines
493 B
Go

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"`
}