veza/veza-backend-api/internal/models/storage_quota.go

16 lines
436 B
Go
Raw Normal View History

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