Yimaru-BackEnd/gen/db/models.go

202 lines
8.0 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
package dbgen
import (
"github.com/jackc/pgx/v5/pgtype"
)
type Assessment struct {
ID int64 `json:"id"`
CourseID int64 `json:"course_id"`
Title string `json:"title"`
Type string `json:"type"`
TotalScore int32 `json:"total_score"`
DueDate pgtype.Timestamptz `json:"due_date"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type AssessmentAnswer struct {
ID int64 `json:"id"`
AttemptID int64 `json:"attempt_id"`
QuestionID int64 `json:"question_id"`
SelectedOptionID pgtype.Int8 `json:"selected_option_id"`
ShortAnswer pgtype.Text `json:"short_answer"`
IsCorrect bool `json:"is_correct"`
}
type AssessmentAttempt struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
TotalQuestions int32 `json:"total_questions"`
CorrectAnswers int32 `json:"correct_answers"`
ScorePercentage pgtype.Numeric `json:"score_percentage"`
KnowledgeLevel string `json:"knowledge_level"`
CompletedAt pgtype.Timestamptz `json:"completed_at"`
}
type AssessmentQuestion struct {
ID int64 `json:"id"`
Title string `json:"title"`
Description pgtype.Text `json:"description"`
QuestionType string `json:"question_type"`
DifficultyLevel string `json:"difficulty_level"`
IsActive bool `json:"is_active"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type AssessmentQuestionOption struct {
ID int64 `json:"id"`
QuestionID int64 `json:"question_id"`
OptionText string `json:"option_text"`
IsCorrect bool `json:"is_correct"`
}
type AssessmentSubmission struct {
ID int64 `json:"id"`
AssessmentID int64 `json:"assessment_id"`
StudentID int64 `json:"student_id"`
Score pgtype.Int4 `json:"score"`
Feedback pgtype.Text `json:"feedback"`
SubmittedAt pgtype.Timestamptz `json:"submitted_at"`
GradedAt pgtype.Timestamptz `json:"graded_at"`
}
type Course struct {
ID int64 `json:"id"`
InstructorID int64 `json:"instructor_id"`
Title string `json:"title"`
Description pgtype.Text `json:"description"`
Level pgtype.Text `json:"level"`
Language pgtype.Text `json:"language"`
IsPublished bool `json:"is_published"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type CourseModule struct {
ID int64 `json:"id"`
CourseID int64 `json:"course_id"`
Title string `json:"title"`
Position int32 `json:"position"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Enrollment struct {
ID int64 `json:"id"`
CourseID int64 `json:"course_id"`
StudentID int64 `json:"student_id"`
EnrolledAt pgtype.Timestamptz `json:"enrolled_at"`
CompletedAt pgtype.Timestamptz `json:"completed_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 Lesson struct {
ID int64 `json:"id"`
ModuleID int64 `json:"module_id"`
Title string `json:"title"`
ContentType string `json:"content_type"`
ContentUrl pgtype.Text `json:"content_url"`
DurationMinutes pgtype.Int4 `json:"duration_minutes"`
Position int32 `json:"position"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type LessonProgress struct {
ID int64 `json:"id"`
LessonID int64 `json:"lesson_id"`
StudentID int64 `json:"student_id"`
Completed bool `json:"completed"`
CompletedAt pgtype.Timestamptz `json:"completed_at"`
}
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"`
}
type Otp struct {
ID int64 `json:"id"`
UserName string `json:"user_name"`
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 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 User struct {
ID int64 `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
UserName string `json:"user_name"`
Email pgtype.Text `json:"email"`
PhoneNumber pgtype.Text `json:"phone_number"`
Role string `json:"role"`
Password []byte `json:"password"`
Age pgtype.Int4 `json:"age"`
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"`
FavoutiteTopic pgtype.Text `json:"favoutite_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 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"`
}