v0.0.31.1 Корректно сгенерирован резолвер получения Author для комментариев клипов

This commit is contained in:
admin 2025-09-03 19:18:16 +03:00
parent 3324f6eb6f
commit 403f6c1dcc
3 changed files with 0 additions and 18981 deletions

View File

@ -25,7 +25,6 @@ type ClipComment struct {
ID int `json:"id"` ID int `json:"id"`
ClipID int `json:"clip_id"` ClipID int `json:"clip_id"`
AuthorID int `json:"-"` AuthorID int `json:"-"`
Author *User `json:"author"`
Content string `json:"content"` Content string `json:"content"`
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"` UpdatedAt time.Time `json:"updated_at"`

File diff suppressed because it is too large Load Diff

View File

@ -1,131 +0,0 @@
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
package graph
import (
"bytes"
"fmt"
"io"
"strconv"
)
type FollowResult struct {
Success bool `json:"success"`
Message string `json:"message"`
}
type Follower struct {
UserID int `json:"userId"`
Username string `json:"username"`
Avatar string `json:"avatar"`
CreatedAt string `json:"createdAt"`
}
type FollowersResponse struct {
Followers []*Follower `json:"followers"`
TotalCount int `json:"totalCount"`
}
type Following struct {
UserID int `json:"userId"`
Username string `json:"username"`
Avatar string `json:"avatar"`
CreatedAt string `json:"createdAt"`
}
type FollowingResponse struct {
Following []*Following `json:"following"`
TotalCount int `json:"totalCount"`
}
type MarkNotificationReadResult struct {
Success bool `json:"success"`
Message string `json:"message"`
}
type Mutation struct {
}
type NotificationsResponse struct {
Notifications []*SubscriptionNotification `json:"notifications"`
TotalCount int `json:"totalCount"`
UnreadCount int `json:"unreadCount"`
}
type Query struct {
}
type Subscription struct {
}
type SubscriptionNotification struct {
ID int `json:"id"`
FollowerID int `json:"followerId"`
FollowerUsername string `json:"followerUsername"`
FollowerAvatar string `json:"followerAvatar"`
IsRead bool `json:"isRead"`
CreatedAt string `json:"createdAt"`
ExpiresAt string `json:"expiresAt"`
}
type UnfollowResult struct {
Success bool `json:"success"`
Message string `json:"message"`
}
type MessageStatus string
const (
MessageStatusSent MessageStatus = "SENT"
MessageStatusDelivered MessageStatus = "DELIVERED"
MessageStatusRead MessageStatus = "READ"
)
var AllMessageStatus = []MessageStatus{
MessageStatusSent,
MessageStatusDelivered,
MessageStatusRead,
}
func (e MessageStatus) IsValid() bool {
switch e {
case MessageStatusSent, MessageStatusDelivered, MessageStatusRead:
return true
}
return false
}
func (e MessageStatus) String() string {
return string(e)
}
func (e *MessageStatus) UnmarshalGQL(v any) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = MessageStatus(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid MessageStatus", str)
}
return nil
}
func (e MessageStatus) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
func (e *MessageStatus) UnmarshalJSON(b []byte) error {
s, err := strconv.Unquote(string(b))
if err != nil {
return err
}
return e.UnmarshalGQL(s)
}
func (e MessageStatus) MarshalJSON() ([]byte, error) {
var buf bytes.Buffer
e.MarshalGQL(&buf)
return buf.Bytes(), nil
}