feat: add customer list, modify pagination utils

This commit is contained in:
2026-04-07 09:28:39 +02:00
parent c5cc4f7a48
commit 813d1f4879
8 changed files with 61 additions and 55 deletions

View File

@@ -15,7 +15,7 @@ type Customer struct {
FirstName string `gorm:"size:100" json:"first_name"`
LastName string `gorm:"size:100" json:"last_name"`
RoleID uint `gorm:"column:role_id;not null;default:1" json:"-"`
Role Role `gorm:"foreignKey:RoleID" json:"role"`
Role *Role `gorm:"foreignKey:RoleID" json:"role,omitempty"`
Provider AuthProvider `gorm:"type:varchar(20);default:'local'" json:"provider"`
ProviderID string `gorm:"size:255" json:"provider_id,omitempty"` // ID from OAuth provider
AvatarURL string `gorm:"size:500" json:"avatar_url,omitempty"`