Skip to content

Commit

Permalink
fix(stack): can be delete (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainDreidemy authored Sep 8, 2023
1 parent 8830021 commit 064e391
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions api/src/models/stack_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ package models
import "github.com/google/uuid"

type Stack struct {
ID *uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
Name string `gorm:"type:varchar(100);not null"`
Description string `gorm:"type:text"`
UserID *uuid.UUID
User User
Services []Service `gorm:"constraint:OnDelete:CASCADE;"`
ID *uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
Name string `gorm:"type:varchar(100);not null"`
Description string `gorm:"type:text"`
UserID *uuid.UUID
User User
Services []Service `gorm:"constraint:OnDelete:CASCADE;"`
Networks []Network `gorm:"constraint:OnDelete:CASCADE;"`
ManagedVolumes []ManagedVolume `gorm:"constraint:OnDelete:CASCADE;"`
}

type StackCreateInput struct {
Expand Down

0 comments on commit 064e391

Please sign in to comment.