feat: Authors feature backend (and upgraded deprecated mods)

This commit is contained in:
Florian Sylvain committed 2026-10-14 17:45:00 +02:00
1 parent a11338094e
commit b34a173d83
103 files changed
+6454 -240

No files matched your search

@@ -0,0 +1,23 @@
package models
import "time"
type Author struct {
ID uint32 `gorm:"primaryKey;autoIncrement"`
Name string `gorm:"size:100;not null"`
Slug string `gorm:"size:100;not null;uniqueIndex"`
Bio string `gorm:"size:280;not null"`
AvatarID *uint32 `gorm:"index"`
Website *string `gorm:"size:2048"`
SocialLinks string `gorm:"type:text;not null"`
UserID *uint32 `gorm:"uniqueIndex"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
}
type ArticleAuthor struct {
ID uint32 `gorm:"primaryKey;autoIncrement"`
ArticleID uint32 `gorm:"not null;uniqueIndex:idx_article_authors_pair"`
AuthorID uint32 `gorm:"not null;uniqueIndex:idx_article_authors_pair;index"`
Position int `gorm:"not null"`
}