Refactor RefreshToken entity to replace TenantID with ClientID for consistency
This commit is contained in:
parent
9fc51fdefa
commit
e27712ab18
|
|
@ -9,10 +9,12 @@ import (
|
|||
type RefreshToken struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;primary_key;default:uuid_generate_v4()" json:"id"`
|
||||
UserID uuid.UUID `gorm:"type:uuid;not null" json:"user_id"`
|
||||
TenantID uuid.UUID `gorm:"type:uuid;not null" json:"tenant_id"`
|
||||
ClientID uuid.UUID `gorm:"type:uuid;not null" json:"client_id"`
|
||||
// TenantID uuid.UUID `gorm:"type:uuid;not null" json:"tenant_id"`
|
||||
Token string `gorm:"type:varchar(255);not null;uniqueIndex" json:"token"`
|
||||
ExpiresAt time.Time `gorm:"type:timestamp with time zone;not null" json:"expires_at"`
|
||||
User User `gorm:"foreignKey:UserID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"`
|
||||
Tenant Tenant `gorm:"foreignKey:TenantID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"`
|
||||
User M_User `gorm:"foreignKey:UserID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"`
|
||||
// Tenant Tenant `gorm:"foreignKey:TenantID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"`
|
||||
|
||||
Timestamp
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue