Files
oidc-server/models/client.go

24 lines
466 B
Go

package models
import (
"time"
"gorm.io/gorm"
)
type Client struct {
gorm.Model
ClientID string `gorm:"uniqueIndex;not null"`
ClientSecret string `gorm:"not null"`
RedirectURIs []string `gorm:"type:json"`
GrantTypes []string `gorm:"type:json"`
Scopes []string `gorm:"type:json"`
IsActive bool `gorm:"default:true"`
CreatedAt time.Time
UpdatedAt time.Time
}
func (c *Client) TableName() string {
return "oauth_clients"
}