features/added-user-tables #3

Merged
jtom38 merged 7 commits from features/added-user-tables into main 2024-04-26 16:06:36 -07:00
2 changed files with 175 additions and 72 deletions
Showing only changes of commit d1a4d10df0 - Show all commits

View File

@ -1 +1,86 @@
package domain package domain
import "time"
type ArticleDto struct {
ID int64 `json:"id"`
SourceID int64 `json:"sourceId"`
Tags string `json:"tags"`
Title string `json:"title"`
Url string `json:"url"`
PubDate time.Time `json:"pubDate"`
Video string `json:"video"`
VideoHeight uint16 `json:"videoHeight"`
VideoWidth uint16 `json:"videoWidth"`
Thumbnail string `json:"thumbnail"`
Description string `json:"description"`
AuthorName string `json:"authorName"`
AuthorImage string `json:"authorImage"`
}
type DiscordQueueDto struct {
//CreatedAt time.Time `json:"createdAt"`
//UpdatedAt time.Time `json:"updatedAt"`
ID int64 `json:"id"`
ArticleId int64 `json:"articleId"`
SourceId int64 `json:"sourceId"`
}
type DiscordWebHookDto struct {
//CreatedAt time.Time `json:"CreatedAt"`
//UpdatedAt time.Time `json:"UpdatedAt"`
//DeletedAt time.Time `json:"DeletedAt"`
ID uint `json:"id"`
Name string `json:"name"`
Key string `json:"key"`
Url string `json:"url"`
Server string `json:"server"`
Channel string `json:"channel"`
Enabled bool `json:"enabled"`
}
type IconDto struct {
//CreatedAt time.Time `json:"CreatedAt"`
//UpdatedAt time.Time `json:"UpdatedAt"`
//DeletedAt time.Time `json:"DeletedAt"`
ID int64 `json:"id"`
FileName string `json:"fileName"`
Site string `json:"site"`
}
type SettingDto struct {
//CreatedAt time.Time `json:"CreatedAt"`
//UpdatedAt time.Time `json:"UpdatedAt"`
//DeletedAt time.Time `json:"DeletedAt"`
ID int64 `json:"id"`
Key string `json:"key"`
Value string `json:"value"`
Options string `json:"options"`
}
type SubscriptionDto struct {
//CreatedAt time.Time `json:"CreatedAt"`
//UpdatedAt time.Time `json:"UpdatedAt"`
//DeletedAt time.Time `json:"DeletedAt"`
ID int64 `json:"id"`
SourceID int64 `json:"sourceId"`
SourceType string `json:"sourceType"`
SourceName string `json:"sourceName"`
DiscordID int64 `json:"discordId"`
DiscordName string `json:"discordName"`
}
type SourceDto struct {
//CreatedAt time.Time `json:"CreatedAt"`
//UpdatedAt time.Time `json:"UpdatedAt"`
//DeletedAt time.Time `json:"DeletedAt"`
ID int64 `json:"id"`
Site string `json:"site"`
Name string `json:"name"`
Source string `json:"source"`
Type string `json:"type"`
Value string `json:"value"`
Enabled bool `json:"enabled"`
Url string `json:"url"`
Tags string `json:"tags"`
}

View File

@ -4,87 +4,105 @@ import (
"time" "time"
) )
// Articles represents the model for an Article type ArticleEntity struct {
type Articles struct { ID int64
ID uint `json:"ID"` CreatedAt time.Time
SourceID uint `json:"sourceId"` LastUpdated time.Time
Tags string `json:"tags"` DeletedAt time.Time
Title string `json:"title"` SourceID int64
Url string `json:"url"` Tags string
PubDate time.Time `json:"pubdate"` Title string
Video string `json:"video"` Url string
VideoHeight uint16 `json:"videoHeight"` PubDate time.Time
VideoWidth uint16 `json:"videoWidth"` Thumbnail string
Thumbnail string `json:"thumbnail"` Description string
Description string `json:"description"` AuthorName string
AuthorName string `json:"authorName"` AuthorImageUrl string
AuthorImage string `json:"authorImage"`
} }
type DiscordQueue struct { type DiscordQueueEntity struct {
ID uint `json:"ID"` ID int64
CreatedAt time.Time `json:"CreatedAt"` CreatedAt time.Time
UpdatedAt time.Time `json:"UpdatedAt"` LastUpdated time.Time
DeletedAt time.Time `json:"DeletedAt"` DeletedAt time.Time
ArticleId string `json:"articleId"` ArticleId int64
SourceId int64
} }
type DiscordWebHooks struct { type DiscordWebHookEntity struct {
ID uint `json:"ID"` ID int64
CreatedAt time.Time `json:"CreatedAt"` CreatedAt time.Time
UpdatedAt time.Time `json:"UpdatedAt"` UpdatedAt time.Time
DeletedAt time.Time `json:"DeletedAt"` DeletedAt time.Time
Name string
Name string `json:"name"` Key string
Key string `json:"key"` Url string
Url string `json:"url"` Server string
Server string `json:"server"` Channel string
Channel string `json:"channel"` Enabled bool
Enabled bool `json:"enabled"`
} }
type Icons struct { type IconEntity struct {
ID uint `json:"ID"` ID int64
CreatedAt time.Time `json:"CreatedAt"` CreatedAt time.Time
UpdatedAt time.Time `json:"UpdatedAt"` UpdatedAt time.Time
DeletedAt time.Time `json:"DeletedAt"` DeletedAt time.Time
FileName string
FileName string `json:"fileName"` Site string
Site string `json:"site"`
} }
type Settings struct { type SettingEntity struct {
ID uint `json:"ID"` ID int64
CreatedAt time.Time `json:"CreatedAt"` CreatedAt time.Time
UpdatedAt time.Time `json:"UpdatedAt"` UpdatedAt time.Time
DeletedAt time.Time `json:"DeletedAt"` DeletedAt time.Time
Key string
Key string `json:"key"` Value string
Value string `json:"value"` Options string
Options string `json:"options"`
} }
type Sources struct { type SourceEntity struct {
ID uint `json:"ID"` ID int64
Site string `json:"site"` CreatedAt time.Time
Name string `json:"name"` UpdatedAt time.Time
Source string `json:"source"` DeletedAt time.Time
Type string `json:"type"` Site string
Value string `json:"value"` Name string
Enabled bool `json:"enabled"` Source string
Url string `json:"url"` Type string
Tags string `json:"tags"` Value string
Enabled bool
Url string
Tags string
} }
type SourceLinks struct { type SubscriptionEntity struct {
ID uint `json:"ID"` ID int64
CreatedAt time.Time `json:"CreatedAt"` CreatedAt time.Time
UpdatedAt time.Time `json:"UpdatedAt"` UpdatedAt time.Time
DeletedAt time.Time `json:"DeletedAt"` DeletedAt time.Time
SourceID int64
SourceID uint `json:"sourceId"` SourceType string
SourceType string `json:"sourceType"` SourceName string
SourceName string `json:"sourceName"` DiscordID int64
DiscordID uint `json:"discordId"` DiscordName string
DiscordName string `json:"discordName"` }
type UserEntity struct {
ID int64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
Username string
Hash string
Scopes string
}
type RefreshTokenEntity struct {
ID int64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
Username string
Token string
} }