veza/veza-backend-api/internal/models/storage_quota.go
senke 89cc015e54 feat(v0.501): Sprint 1 -- infrastructure foundations
- Add MinIO S3-compatible storage to docker-compose (dev, staging, prod)
- Create migrations 103-108 (waveform_url, user_folders, user_files,
  user_storage_quotas, gear_items.is_public, gear_images)
- Add Go models: UserFile, UserFolder, StorageQuota, GearImage
- Add WaveformURL to Track model, IsPublic + GearImages to GearItem model
2026-02-22 18:10:25 +01:00

15 lines
436 B
Go

package models
import "github.com/google/uuid"
type StorageQuota struct {
UserID uuid.UUID `gorm:"type:uuid;primaryKey" json:"user_id"`
MaxBytes int64 `gorm:"not null;default:5368709120" json:"max_bytes"`
UsedBytes int64 `gorm:"not null;default:0" json:"used_bytes"`
User User `gorm:"foreignKey:UserID;constraint:OnDelete:CASCADE" json:"-"`
}
func (StorageQuota) TableName() string {
return "user_storage_quotas"
}