This commit is contained in:
parent
daf401a2f7
commit
8d4ba2ecae
14 changed files with 56 additions and 7 deletions
|
@ -30,4 +30,9 @@ type Note struct {
|
|||
Quotes *string // url of the message this note quotes
|
||||
AccessLevel NoteAccessLevel // Where to send this message to (public, home, followers, dm)
|
||||
OriginServer string // Url of the origin server. Also the primary key for those
|
||||
|
||||
AttachmentRelations []NoteToAttachment `gorm:"foreignKey:NoteId"`
|
||||
EmoteRelations []NoteToEmote `gorm:"foreignKey:NoteId"`
|
||||
PingRelations []NoteToPing `gorm:"foreignKey:NoteId"`
|
||||
Tags []NoteTag `gorm:"foreignKey:NoteId"`
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package models
|
||||
|
||||
type NoteToAttachment struct {
|
||||
UserId string
|
||||
Note Note
|
||||
NoteId string
|
||||
Attachment MediaMetadata
|
||||
AttachmentId string
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
package models
|
||||
|
||||
type NoteToEmote struct {
|
||||
UserId string
|
||||
Note Note
|
||||
NoteId string
|
||||
Emote Emote
|
||||
EmoteId string
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
package models
|
||||
|
||||
type NoteToPing struct {
|
||||
UserId string
|
||||
Note Note
|
||||
NoteId string
|
||||
PingTarget User
|
||||
PingTargetId string
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package models
|
||||
|
||||
type NoteTag struct {
|
||||
UserId string
|
||||
Note Note
|
||||
NoteId string
|
||||
Tag string
|
||||
}
|
|
@ -4,7 +4,10 @@ import "gorm.io/gorm"
|
|||
|
||||
type Reaction struct {
|
||||
gorm.Model
|
||||
Note Note
|
||||
NoteId string
|
||||
Reactor User
|
||||
ReactorId string
|
||||
Emote Emote
|
||||
EmoteId uint
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package models
|
||||
|
||||
type UserAuthMethod struct {
|
||||
User User
|
||||
UserId string
|
||||
AuthMethod AuthenticationMethodType `gorm:"type:auth_method_type"`
|
||||
Token []byte
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package models
|
||||
|
||||
type UserBeings struct {
|
||||
User User
|
||||
UserId string
|
||||
Being BeingType `gorm:"type:being_type"`
|
||||
}
|
||||
|
|
|
@ -15,5 +15,6 @@ type UserInfoField struct {
|
|||
// 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
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package models
|
||||
|
||||
type UserRelation struct {
|
||||
User User
|
||||
UserId string
|
||||
TargetUser User
|
||||
TargetUserId string
|
||||
Relation RelationType `gorm:"type:relation_type"`
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ type UserRemoteLinks struct {
|
|||
// ---- Section: gorm
|
||||
// Sets this struct up as a value that an Account may have
|
||||
gorm.Model
|
||||
User User
|
||||
UserId string
|
||||
|
||||
// Just about every link here is optional to accomodate for servers with only minimal accounts
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package models
|
||||
|
||||
type UserRole struct {
|
||||
User User
|
||||
UserId string
|
||||
Role Role
|
||||
RoleId uint
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package models
|
||||
|
||||
type UserTag struct {
|
||||
User User
|
||||
UserId string
|
||||
Tag string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue