introduce federated repo

This commit is contained in:
Michael Jerger 2024-03-21 08:25:40 +01:00
parent 3b30c678e7
commit b4bb41e0e3
5 changed files with 69 additions and 3 deletions

View file

@ -10,8 +10,8 @@ import (
type FederatedUser struct {
ID int64 `xorm:"pk autoincr"`
UserID int64 `xorm:"NOT NULL"`
ExternalID string `xorm:"TEXT UNIQUE(federation_mapping) NOT NULL"`
FederationHostID int64 `xorm:"UNIQUE(federation_mapping) NOT NULL"`
ExternalID string `xorm:"TEXT UNIQUE(federation_user_mapping) NOT NULL"`
FederationHostID int64 `xorm:"UNIQUE(federation_user_mapping) NOT NULL"`
}
func NewFederatedUser(userID int64, externalID string, federationHostID int64) (FederatedUser, error) {