413 lines
18 KiB
Go
413 lines
18 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.30.0
|
|
|
|
package dbgen
|
|
|
|
import (
|
|
"github.com/jackc/pgx/v5/pgtype"
|
|
)
|
|
|
|
type ActivityLog struct {
|
|
ID int64 `json:"id"`
|
|
ActorID pgtype.Int8 `json:"actor_id"`
|
|
ActorRole pgtype.Text `json:"actor_role"`
|
|
Action string `json:"action"`
|
|
ResourceType string `json:"resource_type"`
|
|
ResourceID pgtype.Int8 `json:"resource_id"`
|
|
Message pgtype.Text `json:"message"`
|
|
Metadata []byte `json:"metadata"`
|
|
IpAddress pgtype.Text `json:"ip_address"`
|
|
UserAgent pgtype.Text `json:"user_agent"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Course struct {
|
|
ID int64 `json:"id"`
|
|
CategoryID int64 `json:"category_id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
IsActive bool `json:"is_active"`
|
|
Thumbnail pgtype.Text `json:"thumbnail"`
|
|
IntroVideoUrl pgtype.Text `json:"intro_video_url"`
|
|
}
|
|
|
|
type CourseCategory struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
IsActive bool `json:"is_active"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Device struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
DeviceToken string `json:"device_token"`
|
|
Platform pgtype.Text `json:"platform"`
|
|
IsActive pgtype.Bool `json:"is_active"`
|
|
LastSeen pgtype.Timestamptz `json:"last_seen"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type GlobalSetting struct {
|
|
Key string `json:"key"`
|
|
Value string `json:"value"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type LevelToSubCourse struct {
|
|
LevelID int64 `json:"level_id"`
|
|
SubCourseID int64 `json:"sub_course_id"`
|
|
}
|
|
|
|
type ModuleToSubCourse struct {
|
|
ModuleID int64 `json:"module_id"`
|
|
SubCourseID int64 `json:"sub_course_id"`
|
|
}
|
|
|
|
type Notification struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
Type string `json:"type"`
|
|
Level string `json:"level"`
|
|
Channel pgtype.Text `json:"channel"`
|
|
Title string `json:"title"`
|
|
Message string `json:"message"`
|
|
Payload []byte `json:"payload"`
|
|
IsRead bool `json:"is_read"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
ReadAt pgtype.Timestamptz `json:"read_at"`
|
|
ReceiverType string `json:"receiver_type"`
|
|
}
|
|
|
|
type Otp struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
SentTo string `json:"sent_to"`
|
|
Medium string `json:"medium"`
|
|
OtpFor string `json:"otp_for"`
|
|
Otp string `json:"otp"`
|
|
Used bool `json:"used"`
|
|
UsedAt pgtype.Timestamptz `json:"used_at"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Payment struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
PlanID pgtype.Int8 `json:"plan_id"`
|
|
SubscriptionID pgtype.Int8 `json:"subscription_id"`
|
|
SessionID pgtype.Text `json:"session_id"`
|
|
TransactionID pgtype.Text `json:"transaction_id"`
|
|
Nonce string `json:"nonce"`
|
|
Amount pgtype.Numeric `json:"amount"`
|
|
Currency string `json:"currency"`
|
|
PaymentMethod pgtype.Text `json:"payment_method"`
|
|
Status string `json:"status"`
|
|
PaymentUrl pgtype.Text `json:"payment_url"`
|
|
PaidAt pgtype.Timestamptz `json:"paid_at"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type Permission struct {
|
|
ID int64 `json:"id"`
|
|
Key string `json:"key"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
GroupName string `json:"group_name"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Question struct {
|
|
ID int64 `json:"id"`
|
|
QuestionText string `json:"question_text"`
|
|
QuestionType string `json:"question_type"`
|
|
DifficultyLevel pgtype.Text `json:"difficulty_level"`
|
|
Points int32 `json:"points"`
|
|
Explanation pgtype.Text `json:"explanation"`
|
|
Tips pgtype.Text `json:"tips"`
|
|
VoicePrompt pgtype.Text `json:"voice_prompt"`
|
|
SampleAnswerVoicePrompt pgtype.Text `json:"sample_answer_voice_prompt"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
ImageUrl pgtype.Text `json:"image_url"`
|
|
}
|
|
|
|
type QuestionAudioAnswer struct {
|
|
ID int64 `json:"id"`
|
|
QuestionID int64 `json:"question_id"`
|
|
CorrectAnswerText string `json:"correct_answer_text"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type QuestionOption struct {
|
|
ID int64 `json:"id"`
|
|
QuestionID int64 `json:"question_id"`
|
|
OptionText string `json:"option_text"`
|
|
OptionOrder int32 `json:"option_order"`
|
|
IsCorrect bool `json:"is_correct"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type QuestionSet struct {
|
|
ID int64 `json:"id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
SetType string `json:"set_type"`
|
|
OwnerType pgtype.Text `json:"owner_type"`
|
|
OwnerID pgtype.Int8 `json:"owner_id"`
|
|
BannerImage pgtype.Text `json:"banner_image"`
|
|
Persona pgtype.Text `json:"persona"`
|
|
TimeLimitMinutes pgtype.Int4 `json:"time_limit_minutes"`
|
|
PassingScore pgtype.Int4 `json:"passing_score"`
|
|
ShuffleQuestions bool `json:"shuffle_questions"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
SubCourseVideoID pgtype.Int8 `json:"sub_course_video_id"`
|
|
}
|
|
|
|
type QuestionSetItem struct {
|
|
ID int64 `json:"id"`
|
|
SetID int64 `json:"set_id"`
|
|
QuestionID int64 `json:"question_id"`
|
|
DisplayOrder int32 `json:"display_order"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type QuestionSetPersona struct {
|
|
ID int64 `json:"id"`
|
|
QuestionSetID int64 `json:"question_set_id"`
|
|
UserID int64 `json:"user_id"`
|
|
DisplayOrder pgtype.Int4 `json:"display_order"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type QuestionShortAnswer struct {
|
|
ID int64 `json:"id"`
|
|
QuestionID int64 `json:"question_id"`
|
|
AcceptableAnswer string `json:"acceptable_answer"`
|
|
MatchType string `json:"match_type"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Rating struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
TargetType string `json:"target_type"`
|
|
TargetID int64 `json:"target_id"`
|
|
Stars int16 `json:"stars"`
|
|
Review pgtype.Text `json:"review"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type RefreshToken struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
Token string `json:"token"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
Revoked bool `json:"revoked"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ReportedIssue struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
UserRole string `json:"user_role"`
|
|
Subject string `json:"subject"`
|
|
Description string `json:"description"`
|
|
IssueType string `json:"issue_type"`
|
|
Status string `json:"status"`
|
|
Metadata []byte `json:"metadata"`
|
|
CreatedAt pgtype.Timestamp `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamp `json:"updated_at"`
|
|
}
|
|
|
|
type Role struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
IsSystem bool `json:"is_system"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type RolePermission struct {
|
|
RoleID int64 `json:"role_id"`
|
|
PermissionID int64 `json:"permission_id"`
|
|
}
|
|
|
|
type ScheduledNotification struct {
|
|
ID int64 `json:"id"`
|
|
Channel string `json:"channel"`
|
|
Title pgtype.Text `json:"title"`
|
|
Message string `json:"message"`
|
|
Html pgtype.Text `json:"html"`
|
|
ScheduledAt pgtype.Timestamptz `json:"scheduled_at"`
|
|
Status string `json:"status"`
|
|
TargetUserIds []int64 `json:"target_user_ids"`
|
|
TargetRole pgtype.Text `json:"target_role"`
|
|
TargetRaw []byte `json:"target_raw"`
|
|
AttemptCount int32 `json:"attempt_count"`
|
|
LastError pgtype.Text `json:"last_error"`
|
|
ProcessingStartedAt pgtype.Timestamptz `json:"processing_started_at"`
|
|
SentAt pgtype.Timestamptz `json:"sent_at"`
|
|
CancelledAt pgtype.Timestamptz `json:"cancelled_at"`
|
|
CreatedBy int64 `json:"created_by"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type SubCourse struct {
|
|
ID int64 `json:"id"`
|
|
CourseID int64 `json:"course_id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
Thumbnail pgtype.Text `json:"thumbnail"`
|
|
DisplayOrder int32 `json:"display_order"`
|
|
Level string `json:"level"`
|
|
IsActive bool `json:"is_active"`
|
|
}
|
|
|
|
type SubCoursePrerequisite struct {
|
|
ID int64 `json:"id"`
|
|
SubCourseID int64 `json:"sub_course_id"`
|
|
PrerequisiteSubCourseID int64 `json:"prerequisite_sub_course_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type SubCourseVideo struct {
|
|
ID int64 `json:"id"`
|
|
SubCourseID int64 `json:"sub_course_id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
VideoUrl string `json:"video_url"`
|
|
Duration int32 `json:"duration"`
|
|
Resolution pgtype.Text `json:"resolution"`
|
|
IsPublished bool `json:"is_published"`
|
|
PublishDate pgtype.Timestamptz `json:"publish_date"`
|
|
Visibility pgtype.Text `json:"visibility"`
|
|
InstructorID pgtype.Text `json:"instructor_id"`
|
|
Thumbnail pgtype.Text `json:"thumbnail"`
|
|
DisplayOrder int32 `json:"display_order"`
|
|
Status string `json:"status"`
|
|
// Vimeo video ID for videos hosted on Vimeo
|
|
VimeoID pgtype.Text `json:"vimeo_id"`
|
|
// Vimeo player embed URL
|
|
VimeoEmbedUrl pgtype.Text `json:"vimeo_embed_url"`
|
|
// Vimeo iframe embed HTML code
|
|
VimeoPlayerHtml pgtype.Text `json:"vimeo_player_html"`
|
|
// Vimeo video status: pending, uploading, transcoding, available, error
|
|
VimeoStatus pgtype.Text `json:"vimeo_status"`
|
|
// Video hosting provider: DIRECT or VIMEO
|
|
VideoHostProvider pgtype.Text `json:"video_host_provider"`
|
|
}
|
|
|
|
type SubscriptionPlan struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Description pgtype.Text `json:"description"`
|
|
DurationValue int32 `json:"duration_value"`
|
|
DurationUnit string `json:"duration_unit"`
|
|
Price pgtype.Numeric `json:"price"`
|
|
Currency string `json:"currency"`
|
|
IsActive bool `json:"is_active"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type TeamMember struct {
|
|
ID int64 `json:"id"`
|
|
FirstName string `json:"first_name"`
|
|
LastName string `json:"last_name"`
|
|
Email string `json:"email"`
|
|
PhoneNumber pgtype.Text `json:"phone_number"`
|
|
Password []byte `json:"password"`
|
|
TeamRole string `json:"team_role"`
|
|
Department pgtype.Text `json:"department"`
|
|
JobTitle pgtype.Text `json:"job_title"`
|
|
EmploymentType pgtype.Text `json:"employment_type"`
|
|
HireDate pgtype.Date `json:"hire_date"`
|
|
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
|
Bio pgtype.Text `json:"bio"`
|
|
WorkPhone pgtype.Text `json:"work_phone"`
|
|
EmergencyContact pgtype.Text `json:"emergency_contact"`
|
|
Status string `json:"status"`
|
|
EmailVerified bool `json:"email_verified"`
|
|
Permissions []byte `json:"permissions"`
|
|
LastLogin pgtype.Timestamptz `json:"last_login"`
|
|
CreatedBy pgtype.Int8 `json:"created_by"`
|
|
UpdatedBy pgtype.Int8 `json:"updated_by"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type User struct {
|
|
ID int64 `json:"id"`
|
|
FirstName pgtype.Text `json:"first_name"`
|
|
LastName pgtype.Text `json:"last_name"`
|
|
Gender pgtype.Text `json:"gender"`
|
|
BirthDay pgtype.Date `json:"birth_day"`
|
|
Email pgtype.Text `json:"email"`
|
|
PhoneNumber pgtype.Text `json:"phone_number"`
|
|
Role string `json:"role"`
|
|
Password []byte `json:"password"`
|
|
EducationLevel pgtype.Text `json:"education_level"`
|
|
Country pgtype.Text `json:"country"`
|
|
Region pgtype.Text `json:"region"`
|
|
KnowledgeLevel pgtype.Text `json:"knowledge_level"`
|
|
NickName pgtype.Text `json:"nick_name"`
|
|
Occupation pgtype.Text `json:"occupation"`
|
|
LearningGoal pgtype.Text `json:"learning_goal"`
|
|
LanguageGoal pgtype.Text `json:"language_goal"`
|
|
LanguageChallange pgtype.Text `json:"language_challange"`
|
|
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
|
InitialAssessmentCompleted bool `json:"initial_assessment_completed"`
|
|
EmailVerified bool `json:"email_verified"`
|
|
PhoneVerified bool `json:"phone_verified"`
|
|
Status string `json:"status"`
|
|
LastLogin pgtype.Timestamptz `json:"last_login"`
|
|
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
|
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
|
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
AgeGroup pgtype.Text `json:"age_group"`
|
|
GoogleID pgtype.Text `json:"google_id"`
|
|
GoogleEmailVerified pgtype.Bool `json:"google_email_verified"`
|
|
ProfileCompletionPercentage int16 `json:"profile_completion_percentage"`
|
|
}
|
|
|
|
type UserSubCourseProgress struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
SubCourseID int64 `json:"sub_course_id"`
|
|
Status string `json:"status"`
|
|
ProgressPercentage int16 `json:"progress_percentage"`
|
|
StartedAt pgtype.Timestamptz `json:"started_at"`
|
|
CompletedAt pgtype.Timestamptz `json:"completed_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type UserSubscription struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
PlanID int64 `json:"plan_id"`
|
|
StartsAt pgtype.Timestamptz `json:"starts_at"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
Status string `json:"status"`
|
|
PaymentReference pgtype.Text `json:"payment_reference"`
|
|
PaymentMethod pgtype.Text `json:"payment_method"`
|
|
AutoRenew bool `json:"auto_renew"`
|
|
CancelledAt pgtype.Timestamptz `json:"cancelled_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|