func (a Account) OrganizationOrUserIdentifiers() *ttnpb.OrganizationOrUserIdentifiers {
	switch a.AccountType {
	case "user":
		return ttnpb.UserIdentifiers{UserId: a.UID}.OrganizationOrUserIdentifiers()
	case "organization":
		return ttnpb.OrganizationIdentifiers{OrganizationId: a.UID}.OrganizationOrUserIdentifiers()
	default:
		panic("account is neither user nor organization")
	}
}
OrganizationOrUserIdentifiers for the account, depending on its type.
package store
import (
	"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
)
type Account struct {
	Model
	SoftDelete
	UID string `gorm:"type:VARCHAR(36);unique_index:account_uid_index"`
	AccountID   string `gorm:"type:UUID;index:account_id_index;not null"`
	AccountType string `gorm:"type:VARCHAR(32);index:account_id_index;not null"`  
	Memberships []*Membership
}
func init() {
	registerModel(&Account{})
}