- Config: try ENV_FILE, .env, ../.env for loading; trim trailing slash from BaseURL - Log BASE_URL at server startup for verification - .env.example: document BASE_URL - Tasks, projects, tags, migrations and related API/handlers Made-with: Cursor
234 lines
8.8 KiB
Go
234 lines
8.8 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.30.0
|
|
|
|
package repository
|
|
|
|
import (
|
|
"github.com/jackc/pgx/v5/pgtype"
|
|
)
|
|
|
|
type ApiKey struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
Name string `json:"name"`
|
|
KeyHash string `json:"key_hash"`
|
|
Scopes []byte `json:"scopes"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
RevokedAt pgtype.Timestamptz `json:"revoked_at"`
|
|
}
|
|
|
|
type AuditLog struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
EntityType string `json:"entity_type"`
|
|
EntityID pgtype.UUID `json:"entity_id"`
|
|
Action string `json:"action"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type BookingLink struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
CalendarID pgtype.UUID `json:"calendar_id"`
|
|
Token string `json:"token"`
|
|
DurationMinutes int32 `json:"duration_minutes"`
|
|
BufferMinutes int32 `json:"buffer_minutes"`
|
|
Timezone string `json:"timezone"`
|
|
WorkingHours []byte `json:"working_hours"`
|
|
Active bool `json:"active"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type Calendar struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
OwnerID pgtype.UUID `json:"owner_id"`
|
|
Name string `json:"name"`
|
|
Color string `json:"color"`
|
|
IsPublic bool `json:"is_public"`
|
|
PublicToken pgtype.Text `json:"public_token"`
|
|
CountForAvailability bool `json:"count_for_availability"`
|
|
DefaultReminderMinutes pgtype.Int4 `json:"default_reminder_minutes"`
|
|
SortOrder int32 `json:"sort_order"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type CalendarMember struct {
|
|
CalendarID pgtype.UUID `json:"calendar_id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
Role string `json:"role"`
|
|
}
|
|
|
|
type CalendarSubscription struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
CalendarID pgtype.UUID `json:"calendar_id"`
|
|
SourceUrl string `json:"source_url"`
|
|
LastSyncedAt pgtype.Timestamptz `json:"last_synced_at"`
|
|
SyncIntervalMinutes pgtype.Int4 `json:"sync_interval_minutes"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Contact struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
OwnerID pgtype.UUID `json:"owner_id"`
|
|
FirstName pgtype.Text `json:"first_name"`
|
|
LastName pgtype.Text `json:"last_name"`
|
|
Email pgtype.Text `json:"email"`
|
|
Phone pgtype.Text `json:"phone"`
|
|
Company pgtype.Text `json:"company"`
|
|
Notes pgtype.Text `json:"notes"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type Event struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
CalendarID pgtype.UUID `json:"calendar_id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
Location pgtype.Text `json:"location"`
|
|
StartTime pgtype.Timestamptz `json:"start_time"`
|
|
EndTime pgtype.Timestamptz `json:"end_time"`
|
|
Timezone string `json:"timezone"`
|
|
AllDay bool `json:"all_day"`
|
|
RecurrenceRule pgtype.Text `json:"recurrence_rule"`
|
|
Tags []string `json:"tags"`
|
|
CreatedBy pgtype.UUID `json:"created_by"`
|
|
UpdatedBy pgtype.UUID `json:"updated_by"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type EventAttachment struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
EventID pgtype.UUID `json:"event_id"`
|
|
FileUrl string `json:"file_url"`
|
|
}
|
|
|
|
type EventAttendee struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
EventID pgtype.UUID `json:"event_id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
Email pgtype.Text `json:"email"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type EventException struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
EventID pgtype.UUID `json:"event_id"`
|
|
ExceptionDate pgtype.Date `json:"exception_date"`
|
|
Action string `json:"action"`
|
|
}
|
|
|
|
type EventReminder struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
EventID pgtype.UUID `json:"event_id"`
|
|
MinutesBefore int32 `json:"minutes_before"`
|
|
}
|
|
|
|
type Project struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
OwnerID pgtype.UUID `json:"owner_id"`
|
|
Name string `json:"name"`
|
|
Color string `json:"color"`
|
|
IsShared bool `json:"is_shared"`
|
|
Deadline pgtype.Timestamptz `json:"deadline"`
|
|
SortOrder int32 `json:"sort_order"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type ProjectMember struct {
|
|
ProjectID pgtype.UUID `json:"project_id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
Role string `json:"role"`
|
|
}
|
|
|
|
type RefreshToken struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
TokenHash string `json:"token_hash"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
RevokedAt pgtype.Timestamptz `json:"revoked_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Tag struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
OwnerID pgtype.UUID `json:"owner_id"`
|
|
Name string `json:"name"`
|
|
Color string `json:"color"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Task struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
OwnerID pgtype.UUID `json:"owner_id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
Status string `json:"status"`
|
|
Priority string `json:"priority"`
|
|
DueDate pgtype.Timestamptz `json:"due_date"`
|
|
CompletedAt pgtype.Timestamptz `json:"completed_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
ProjectID pgtype.UUID `json:"project_id"`
|
|
ParentID pgtype.UUID `json:"parent_id"`
|
|
SortOrder int32 `json:"sort_order"`
|
|
RecurrenceRule pgtype.Text `json:"recurrence_rule"`
|
|
}
|
|
|
|
type TaskDependency struct {
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
BlocksTaskID pgtype.UUID `json:"blocks_task_id"`
|
|
}
|
|
|
|
type TaskReminder struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
Type string `json:"type"`
|
|
Config []byte `json:"config"`
|
|
ScheduledAt pgtype.Timestamptz `json:"scheduled_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type TaskTag struct {
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
TagID pgtype.UUID `json:"tag_id"`
|
|
}
|
|
|
|
type TaskWebhook struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
OwnerID pgtype.UUID `json:"owner_id"`
|
|
Url string `json:"url"`
|
|
Events []byte `json:"events"`
|
|
Secret pgtype.Text `json:"secret"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type User struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
Email string `json:"email"`
|
|
PasswordHash string `json:"password_hash"`
|
|
Timezone string `json:"timezone"`
|
|
IsActive bool `json:"is_active"`
|
|
WeekStartDay int16 `json:"week_start_day"`
|
|
DateFormat string `json:"date_format"`
|
|
TimeFormat string `json:"time_format"`
|
|
DefaultEventDurationMinutes int32 `json:"default_event_duration_minutes"`
|
|
DefaultReminderMinutes int32 `json:"default_reminder_minutes"`
|
|
ShowWeekends bool `json:"show_weekends"`
|
|
WorkingHoursStart string `json:"working_hours_start"`
|
|
WorkingHoursEnd string `json:"working_hours_end"`
|
|
NotificationsEmail bool `json:"notifications_email"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|