25 lines
976 B
Go
25 lines
976 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// A UserInfoField describes one custom key-value information field.
|
|
// Each user may have none, one or more of these fields.
|
|
// If the value is an uri, the server may attempt to verify ownership
|
|
// over that uri by checking the content for a `rel="me"` anchor
|
|
// linking back to the account the field is attached to
|
|
type UserInfoField struct {
|
|
gorm.Model // Can actually just embed this as is here as those are not something directly exposed :3
|
|
Name string
|
|
Value string
|
|
LastUrlCheckDate *time.Time // Used if the value is an url to somewhere. Empty if value is not an url
|
|
// If the value is an url, this attribute indicates whether Linstrom was able to verify ownership
|
|
// of the provided url via the common method of
|
|
// "Does the target url contain a rel='me' link to the owner's account"
|
|
Confirmed bool
|
|
User User
|
|
UserId string // Id of account this info field belongs to
|
|
}
|