2023-09-18 23:57:18 +00:00
|
|
|
// Code generated by sqlc. DO NOT EDIT.
|
|
|
|
// versions:
|
2024-02-26 00:01:34 +00:00
|
|
|
// sqlc v1.25.0
|
2023-09-18 23:57:18 +00:00
|
|
|
|
|
|
|
package database
|
|
|
|
|
2024-02-26 00:01:34 +00:00
|
|
|
import ()
|
2023-09-18 23:57:18 +00:00
|
|
|
|
|
|
|
type Activity struct {
|
2023-11-03 23:38:31 +00:00
|
|
|
ID int64 `json:"id"`
|
|
|
|
UserID string `json:"user_id"`
|
|
|
|
DocumentID string `json:"document_id"`
|
|
|
|
DeviceID string `json:"device_id"`
|
|
|
|
StartTime string `json:"start_time"`
|
|
|
|
StartPercentage float64 `json:"start_percentage"`
|
|
|
|
EndPercentage float64 `json:"end_percentage"`
|
|
|
|
Duration int64 `json:"duration"`
|
|
|
|
CreatedAt string `json:"created_at"`
|
2023-09-18 23:57:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Device struct {
|
2023-10-06 01:04:57 +00:00
|
|
|
ID string `json:"id"`
|
|
|
|
UserID string `json:"user_id"`
|
|
|
|
DeviceName string `json:"device_name"`
|
|
|
|
LastSynced string `json:"last_synced"`
|
|
|
|
CreatedAt string `json:"created_at"`
|
|
|
|
Sync bool `json:"sync"`
|
2023-09-18 23:57:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Document struct {
|
2023-10-06 01:04:57 +00:00
|
|
|
ID string `json:"id"`
|
|
|
|
Md5 *string `json:"md5"`
|
|
|
|
Filepath *string `json:"filepath"`
|
|
|
|
Coverfile *string `json:"coverfile"`
|
|
|
|
Title *string `json:"title"`
|
|
|
|
Author *string `json:"author"`
|
|
|
|
Series *string `json:"series"`
|
|
|
|
SeriesIndex *int64 `json:"series_index"`
|
|
|
|
Lang *string `json:"lang"`
|
|
|
|
Description *string `json:"description"`
|
|
|
|
Words *int64 `json:"words"`
|
|
|
|
Gbid *string `json:"gbid"`
|
|
|
|
Olid *string `json:"-"`
|
|
|
|
Isbn10 *string `json:"isbn10"`
|
|
|
|
Isbn13 *string `json:"isbn13"`
|
|
|
|
Synced bool `json:"-"`
|
|
|
|
Deleted bool `json:"-"`
|
|
|
|
UpdatedAt string `json:"updated_at"`
|
|
|
|
CreatedAt string `json:"created_at"`
|
2023-09-18 23:57:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type DocumentProgress struct {
|
2023-10-06 01:04:57 +00:00
|
|
|
UserID string `json:"user_id"`
|
|
|
|
DocumentID string `json:"document_id"`
|
|
|
|
DeviceID string `json:"device_id"`
|
|
|
|
Percentage float64 `json:"percentage"`
|
|
|
|
Progress string `json:"progress"`
|
|
|
|
CreatedAt string `json:"created_at"`
|
2023-09-18 23:57:18 +00:00
|
|
|
}
|
|
|
|
|
2023-10-03 20:47:38 +00:00
|
|
|
type DocumentUserStatistic struct {
|
2024-01-24 04:00:51 +00:00
|
|
|
DocumentID string `json:"document_id"`
|
|
|
|
UserID string `json:"user_id"`
|
|
|
|
Percentage float64 `json:"percentage"`
|
|
|
|
LastRead string `json:"last_read"`
|
|
|
|
ReadPercentage float64 `json:"read_percentage"`
|
|
|
|
TotalTimeSeconds int64 `json:"total_time_seconds"`
|
|
|
|
TotalWordsRead int64 `json:"total_words_read"`
|
|
|
|
TotalWpm float64 `json:"total_wpm"`
|
|
|
|
YearlyTimeSeconds int64 `json:"yearly_time_seconds"`
|
|
|
|
YearlyWordsRead int64 `json:"yearly_words_read"`
|
|
|
|
YearlyWpm float64 `json:"yearly_wpm"`
|
|
|
|
MonthlyTimeSeconds int64 `json:"monthly_time_seconds"`
|
|
|
|
MonthlyWordsRead int64 `json:"monthly_words_read"`
|
|
|
|
MonthlyWpm float64 `json:"monthly_wpm"`
|
|
|
|
WeeklyTimeSeconds int64 `json:"weekly_time_seconds"`
|
|
|
|
WeeklyWordsRead int64 `json:"weekly_words_read"`
|
|
|
|
WeeklyWpm float64 `json:"weekly_wpm"`
|
2023-10-03 20:47:38 +00:00
|
|
|
}
|
|
|
|
|
2023-09-23 18:14:57 +00:00
|
|
|
type Metadatum struct {
|
2023-10-06 01:04:57 +00:00
|
|
|
ID int64 `json:"id"`
|
|
|
|
DocumentID string `json:"document_id"`
|
|
|
|
Title *string `json:"title"`
|
|
|
|
Author *string `json:"author"`
|
|
|
|
Description *string `json:"description"`
|
|
|
|
Gbid *string `json:"gbid"`
|
|
|
|
Olid *string `json:"olid"`
|
|
|
|
Isbn10 *string `json:"isbn10"`
|
|
|
|
Isbn13 *string `json:"isbn13"`
|
|
|
|
CreatedAt string `json:"created_at"`
|
2023-09-23 18:14:57 +00:00
|
|
|
}
|
|
|
|
|
2024-02-02 01:05:35 +00:00
|
|
|
type Setting struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Value string `json:"value"`
|
|
|
|
CreatedAt string `json:"created_at"`
|
|
|
|
}
|
|
|
|
|
2023-09-18 23:57:18 +00:00
|
|
|
type User struct {
|
2023-10-06 01:04:57 +00:00
|
|
|
ID string `json:"id"`
|
|
|
|
Pass *string `json:"-"`
|
2024-01-29 03:17:58 +00:00
|
|
|
AuthHash *string `json:"auth_hash"`
|
2023-10-06 01:04:57 +00:00
|
|
|
Admin bool `json:"-"`
|
|
|
|
TimeOffset *string `json:"time_offset"`
|
|
|
|
CreatedAt string `json:"created_at"`
|
2023-09-18 23:57:18 +00:00
|
|
|
}
|
2023-10-03 20:47:38 +00:00
|
|
|
|
|
|
|
type UserStreak struct {
|
|
|
|
UserID string `json:"user_id"`
|
|
|
|
Window string `json:"window"`
|
|
|
|
MaxStreak int64 `json:"max_streak"`
|
|
|
|
MaxStreakStartDate string `json:"max_streak_start_date"`
|
|
|
|
MaxStreakEndDate string `json:"max_streak_end_date"`
|
|
|
|
CurrentStreak int64 `json:"current_streak"`
|
|
|
|
CurrentStreakStartDate string `json:"current_streak_start_date"`
|
|
|
|
CurrentStreakEndDate string `json:"current_streak_end_date"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ViewDocumentUserStatistic struct {
|
2024-02-26 00:01:34 +00:00
|
|
|
DocumentID string `json:"document_id"`
|
|
|
|
UserID string `json:"user_id"`
|
|
|
|
Percentage float64 `json:"percentage"`
|
|
|
|
LastRead interface{} `json:"last_read"`
|
|
|
|
ReadPercentage *float64 `json:"read_percentage"`
|
|
|
|
TotalTimeSeconds *float64 `json:"total_time_seconds"`
|
|
|
|
TotalWordsRead interface{} `json:"total_words_read"`
|
|
|
|
TotalWpm int64 `json:"total_wpm"`
|
|
|
|
YearlyTimeSeconds *float64 `json:"yearly_time_seconds"`
|
|
|
|
YearlyWordsRead interface{} `json:"yearly_words_read"`
|
|
|
|
YearlyWpm interface{} `json:"yearly_wpm"`
|
|
|
|
MonthlyTimeSeconds *float64 `json:"monthly_time_seconds"`
|
|
|
|
MonthlyWordsRead interface{} `json:"monthly_words_read"`
|
|
|
|
MonthlyWpm interface{} `json:"monthly_wpm"`
|
|
|
|
WeeklyTimeSeconds *float64 `json:"weekly_time_seconds"`
|
|
|
|
WeeklyWordsRead interface{} `json:"weekly_words_read"`
|
|
|
|
WeeklyWpm interface{} `json:"weekly_wpm"`
|
2023-10-03 20:47:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type ViewUserStreak struct {
|
|
|
|
UserID string `json:"user_id"`
|
|
|
|
Window string `json:"window"`
|
|
|
|
MaxStreak interface{} `json:"max_streak"`
|
|
|
|
MaxStreakStartDate interface{} `json:"max_streak_start_date"`
|
|
|
|
MaxStreakEndDate interface{} `json:"max_streak_end_date"`
|
|
|
|
CurrentStreak interface{} `json:"current_streak"`
|
|
|
|
CurrentStreakStartDate interface{} `json:"current_streak_start_date"`
|
|
|
|
CurrentStreakEndDate interface{} `json:"current_streak_end_date"`
|
|
|
|
}
|