This commit is contained in:
Melody 2024-08-28 17:20:38 +02:00
parent 94197780e1
commit 2977f09245
32 changed files with 763 additions and 936 deletions

View file

@ -7,9 +7,9 @@ import (
)
type Note struct {
ID string `gorm:"primarykey"` // Make ID a string (uuid) for other implementations
CreatedAt time.Time // When this entry was created
UpdatedAt time.Time // When this entry was last updated
ID string `gorm:"primarykey"` // Make ID a string (uuid) for other implementations
CreatedAt time.Time // When this entry was created
UpdatedAt time.Time // When this entry was last updated
// When this entry was deleted (for soft deletions)
// Soft delete means that this entry still exists in the db, but gorm won't include it anymore unless specifically told to
// If not null, this entry is marked as deleted
@ -29,19 +29,3 @@ type Note struct {
OriginServer string // Url of the origin server. Also the primary key for those
Tags []string `gorm:"serializer:json"` // Hashtags
}
var placeholderNote = &Note{
ID: "placeholder",
Creator: "placeholder",
Remote: false,
RawContent: "placeholder",
ContentWarning: nil,
Attachments: []string{},
Emotes: []string{},
RepliesTo: nil,
Quotes: nil,
Target: NOTE_TARGET_HOME,
Pings: []string{},
OriginServer: "placeholder",
Tags: []string{},
}