linstrom/storage-new/models/UserInfoField.go
mstar 67b507f4bd
Some checks are pending
/ test (push) Waiting to run
Describe all types for the new storage system
2025-03-27 10:45:57 +01:00

24 lines
896 B
Go

package models
import (
"time"
"gorm.io/gorm"
)
// One key-value field attached to an account
// 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
}