Skip to content

Commit

Permalink
fix: follower gorm tags
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOduneye committed Feb 21, 2024
1 parent 5b1b17f commit 902ecbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/models/follower.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ func (Follower) TableName() string {
}

type Follower struct {
UserID uuid.UUID `gorm:"type:uuid;not null;primary_key" json:"user_id" validate:"required,uuid4"`
ClubID uuid.UUID `gorm:"type:uuid;not null;primary_key" json:"club_id" validate:"required,uuid4"`
UserID uuid.UUID `gorm:"type:uuid;not null;primary_key;unique_index:idx_user_club_members" json:"user_id" validate:"required,uuid4"`
ClubID uuid.UUID `gorm:"type:uuid;not null;primary_key;unique_index:idx_user_club_members" json:"club_id" validate:"required,uuid4"`

Club *Club `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-" validate:"-"`
User *User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-" validate:"-"`
Expand Down

0 comments on commit 902ecbc

Please sign in to comment.