Files
mtusi2026lab7/internal/storage/postgres/internal/sqlcgen/models.go
T

153 lines
2.9 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package sqlcgen
import (
"time"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
)
type Attachment struct {
ID uuid.UUID
ChatID uuid.UUID
OwnerID uuid.UUID
ObjectKey string
Filename string
ContentType string
SizeBytes int64
Sha256 string
Status string
ErrorCode pgtype.Text
CreatedAt time.Time
UpdatedAt time.Time
PipelineVersion int32
StagingKey pgtype.Text
ReadyAt pgtype.Timestamptz
FailedAt pgtype.Timestamptz
}
type AttachmentJob struct {
JobID uuid.UUID
AttachmentID uuid.UUID
PipelineVersion int32
SourceKey string
Attempt int32
MaxAttempts int32
Status string
AvailableAt time.Time
LeaseOwner pgtype.Text
LeaseExpiresAt pgtype.Timestamptz
LastErrorCode pgtype.Text
ReplayCount int32
CreatedAt time.Time
UpdatedAt time.Time
CompletedAt pgtype.Timestamptz
Traceparent string
Tracestate string
TtrMissedAt pgtype.Timestamptz
}
type AttachmentJobEvent struct {
ID int64
JobID uuid.UUID
Event string
Attempt pgtype.Int4
Detail []byte
CreatedAt time.Time
}
type AttachmentVariant struct {
AttachmentID uuid.UUID
PipelineVersion int32
Name string
ContentType string
SizeBytes int64
Width int32
Height int32
Sha256 string
ObjectKey string
CreatedAt time.Time
}
type Chat struct {
ID uuid.UUID
Title string
CreatedAt time.Time
}
type ChatMember struct {
ChatID uuid.UUID
UserID uuid.UUID
CreatedAt time.Time
}
type LoginLimit struct {
KeyHash string
Count int64
ExpiresAt time.Time
}
type Message struct {
ID uuid.UUID
ChatID uuid.UUID
SenderID uuid.UUID
Text string
CreatedAt time.Time
}
type MessageAttachment struct {
MessageID uuid.UUID
AttachmentID uuid.UUID
Position int16
}
type MessageIdempotency struct {
ActorID uuid.UUID
ChatID uuid.UUID
Key string
RequestHash []byte
MessageID pgtype.UUID
CreatedAt time.Time
ExpiresAt time.Time
}
type OutboxMessage struct {
ID int64
JobID uuid.UUID
Attempt int32
Kind string
RoutingKey string
Payload []byte
AvailableAt time.Time
PublishedAt pgtype.Timestamptz
ClaimedBy pgtype.Text
ClaimedUntil pgtype.Timestamptz
PublishAttempts int32
LastError pgtype.Text
CreatedAt time.Time
}
type Session struct {
TokenHash []byte
UserID uuid.UUID
ExpiresAt time.Time
CreatedAt time.Time
}
type User struct {
ID uuid.UUID
Username string
PasswordHash string
DisplayName string
CreatedAt time.Time
}
type UserChatVersion struct {
UserID uuid.UUID
Version int64
}