Skip to content

Commit

Permalink
Add gorm tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kian99 committed Jul 17, 2024
1 parent 03107b0 commit 2c95c36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/dbmodel/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ type Model struct {
UpdatedAt time.Time

// Name is the name of the model.
Name string
Name string `gorm:"uniqueIndex:unique_model_names;not null"`

// UUID is the UUID of the model.
UUID sql.NullString

// Owner is identity that owns the model.
OwnerIdentityName string
OwnerIdentityName string `gorm:"uniqueIndex:unique_model_names;not null"`
Owner Identity `gorm:"foreignkey:OwnerIdentityName;references:Name"`

// Controller is the controller that is hosting the model.
Expand Down

0 comments on commit 2c95c36

Please sign in to comment.