newsbot-api/internal/domain/entity.go

118 lines
2.1 KiB
Go
Raw Normal View History

2024-04-23 07:15:38 -07:00
package domain
import (
"time"
)
type ArticleEntity struct {
ID int64
CreatedAt time.Time
2024-04-27 07:44:20 -07:00
UpdatedAt time.Time
DeletedAt time.Time
SourceID int64
Tags string
Title string
Url string
PubDate time.Time
2024-04-27 07:44:20 -07:00
IsVideo bool
Thumbnail string
Description string
AuthorName string
AuthorImageUrl string
}
type DiscordQueueEntity struct {
2024-04-27 07:44:20 -07:00
ID int64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
ArticleId int64
SourceId int64
}
type DiscordWebHookEntity struct {
ID int64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
2024-04-27 13:11:03 -07:00
//Name string
//Key string
2024-04-28 10:02:57 -07:00
Url string
Server string
Channel string
Enabled bool
}
type IconEntity struct {
ID int64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
FileName string
Site string
}
type SettingEntity struct {
ID int64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
Key string
Value string
Options string
}
type SourceEntity struct {
2024-04-28 10:02:57 -07:00
ID int64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
// Who will collect from it. Used
// domain.SourceCollector...
Source string
// Human Readable value to state what is getting collected
DisplayName string
// Tells the parser where to look for data
Url string
// Static tags for this defined record
Tags string
// If the record is disabled, then it will be skipped on processing
Enabled bool
}
type SubscriptionEntity struct {
ID int64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
SourceID int64
SourceType string
SourceName string
DiscordID int64
DiscordName string
}
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
}