Files
dns-autoresolver/internal/store/db/models.go
T
vasyansk 3bd237d562 feat(store): миграция sessions/password + методы users/sessions/projects
Фаза 2, Task 1: добавлена таблица sessions и nullable password_hash у
users, sqlc-запросы и *Store-обёртки (CreateUser, GetUserByEmail,
CreateProjectForUser, GetProjectOwned, GetUserProject, CreateSession,
GetSessionUser, DeleteSession, RegisterUser в транзакции), интеграционные
тесты на testcontainers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwxdSt4reTm7Dj1oxRvpP3
2026-07-03 19:44:36 +07:00

70 lines
2.2 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package db
import (
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
dto "github.com/vasyakrg/dns-autoresolver/internal/store/dto"
)
type CheckRun struct {
ID uuid.UUID `json:"id"`
DomainID uuid.UUID `json:"domain_id"`
Result []byte `json:"result"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Domain struct {
ID uuid.UUID `json:"id"`
ProjectID uuid.UUID `json:"project_id"`
ProviderAccountID uuid.UUID `json:"provider_account_id"`
ZoneName string `json:"zone_name"`
ZoneID string `json:"zone_id"`
TemplateID *uuid.UUID `json:"template_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Project struct {
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"user_id"`
Name string `json:"name"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type ProviderAccount struct {
ID uuid.UUID `json:"id"`
ProjectID uuid.UUID `json:"project_id"`
Provider string `json:"provider"`
SecretEnc string `json:"secret_enc"`
Comment string `json:"comment"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Session struct {
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"user_id"`
TokenHash string `json:"token_hash"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Template struct {
ID uuid.UUID `json:"id"`
ProjectID uuid.UUID `json:"project_id"`
Name string `json:"name"`
Doc *dto.TemplateDoc `json:"doc"`
Version int32 `json:"version"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type User struct {
ID uuid.UUID `json:"id"`
Email string `json:"email"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
PasswordHash *string `json:"password_hash"`
}