Add cmd for generating code from the new models
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Melody Becker 2025-03-27 13:35:24 +01:00
parent 67b507f4bd
commit bf5180559f
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
9 changed files with 401 additions and 132 deletions

View file

@ -0,0 +1,22 @@
package models
var AllTypes = []any{
&Emote{},
&MediaMetadata{},
&Note{},
&NoteToAttachment{},
&NoteToEmote{},
&NoteToPing{},
&NoteTag{},
&Reaction{},
&RemoteServer{},
&Role{},
&User{},
&UserAuthMethod{},
&UserToBeing{},
&UserInfoField{},
&UserToUserRelation{},
&UserRemoteLinks{},
&UserToTag{},
&UserToRole{},
}

View file

@ -41,7 +41,7 @@ type Role struct {
gorm.Model
// Name of the role
Name string `gorm:"primaryKey;unique"`
Name string `gorm:"unique"`
// Priority of the role
// Lower priority gets applied first and thus overwritten by higher priority ones