feat: implemented /users/{id} api route
This commit is contained in:
parent
71e2661fb9
commit
948e036e8c
10 changed files with 381 additions and 982 deletions
|
|
@ -7,6 +7,7 @@ package sqlc
|
|||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
)
|
||||
|
|
@ -185,48 +186,42 @@ func (ns NullUsertitleStatusT) Value() (driver.Value, error) {
|
|||
}
|
||||
|
||||
type Image struct {
|
||||
ImageID int32 `json:"image_id"`
|
||||
ID int64 `json:"id"`
|
||||
StorageType StorageTypeT `json:"storage_type"`
|
||||
ImagePath string `json:"image_path"`
|
||||
}
|
||||
|
||||
type Provider struct {
|
||||
ProviderID int32 `json:"provider_id"`
|
||||
ID int64 `json:"id"`
|
||||
ProviderName string `json:"provider_name"`
|
||||
}
|
||||
|
||||
type Review struct {
|
||||
ReviewID int32 `json:"review_id"`
|
||||
UserID int32 `json:"user_id"`
|
||||
TitleID int32 `json:"title_id"`
|
||||
ReviewText string `json:"review_text"`
|
||||
CreationDate pgtype.Timestamp `json:"creation_date"`
|
||||
Credentials []byte `json:"credentials"`
|
||||
}
|
||||
|
||||
type Signal struct {
|
||||
SignalID int32 `json:"signal_id"`
|
||||
ID int64 `json:"id"`
|
||||
TitleID *int64 `json:"title_id"`
|
||||
RawData []byte `json:"raw_data"`
|
||||
ProviderID int32 `json:"provider_id"`
|
||||
Dirty bool `json:"dirty"`
|
||||
ProviderID int64 `json:"provider_id"`
|
||||
Pending bool `json:"pending"`
|
||||
}
|
||||
|
||||
type Studio struct {
|
||||
StudioID int32 `json:"studio_id"`
|
||||
ID int64 `json:"id"`
|
||||
StudioName *string `json:"studio_name"`
|
||||
IllustID *int32 `json:"illust_id"`
|
||||
IllustID *int64 `json:"illust_id"`
|
||||
StudioDesc *string `json:"studio_desc"`
|
||||
}
|
||||
|
||||
type Tag struct {
|
||||
TagID int32 `json:"tag_id"`
|
||||
ID int64 `json:"id"`
|
||||
TagNames []byte `json:"tag_names"`
|
||||
}
|
||||
|
||||
type Title struct {
|
||||
TitleID int32 `json:"title_id"`
|
||||
ID int64 `json:"id"`
|
||||
TitleNames []byte `json:"title_names"`
|
||||
StudioID int32 `json:"studio_id"`
|
||||
PosterID *int32 `json:"poster_id"`
|
||||
StudioID int64 `json:"studio_id"`
|
||||
PosterID *int64 `json:"poster_id"`
|
||||
TitleStatus TitleStatusT `json:"title_status"`
|
||||
Rating *float64 `json:"rating"`
|
||||
RatingCount *int32 `json:"rating_count"`
|
||||
|
|
@ -239,26 +234,27 @@ type Title struct {
|
|||
}
|
||||
|
||||
type TitleTag struct {
|
||||
TitleID int32 `json:"title_id"`
|
||||
TagID int32 `json:"tag_id"`
|
||||
TitleID int64 `json:"title_id"`
|
||||
TagID int64 `json:"tag_id"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
UserID int32 `json:"user_id"`
|
||||
AvatarID *int32 `json:"avatar_id"`
|
||||
Passhash string `json:"passhash"`
|
||||
Mail *string `json:"mail"`
|
||||
Nickname string `json:"nickname"`
|
||||
DispName *string `json:"disp_name"`
|
||||
UserDesc *string `json:"user_desc"`
|
||||
CreationDate pgtype.Timestamp `json:"creation_date"`
|
||||
ID int64 `json:"id"`
|
||||
AvatarID *int64 `json:"avatar_id"`
|
||||
Passhash string `json:"passhash"`
|
||||
Mail *string `json:"mail"`
|
||||
Nickname string `json:"nickname"`
|
||||
DispName *string `json:"disp_name"`
|
||||
UserDesc *string `json:"user_desc"`
|
||||
CreationDate time.Time `json:"creation_date"`
|
||||
LastLogin pgtype.Timestamptz `json:"last_login"`
|
||||
}
|
||||
|
||||
type Usertitle struct {
|
||||
UsertitleID int32 `json:"usertitle_id"`
|
||||
UserID int32 `json:"user_id"`
|
||||
TitleID int32 `json:"title_id"`
|
||||
Status UsertitleStatusT `json:"status"`
|
||||
Rate *int32 `json:"rate"`
|
||||
ReviewID *int32 `json:"review_id"`
|
||||
UserID int64 `json:"user_id"`
|
||||
TitleID int64 `json:"title_id"`
|
||||
Status UsertitleStatusT `json:"status"`
|
||||
Rate *int32 `json:"rate"`
|
||||
ReviewText *string `json:"review_text"`
|
||||
ReviewDate pgtype.Timestamptz `json:"review_date"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue