// LessonTypes stores different types of lessons // lesson_types, lesson_type Table LessonTypes { // system field id int [pk, increment] // unique identifier for the lesson type created datetime [default: `now()`] // timestamp when the lesson type was created updated datetime // timestamp when the lesson type was last updated // value field name varchar // name of the lesson type type varchar // type category } // LessonCategories stores categories of lessons // lesson_categories, lesson_category Table LessonCategories { // system field id int [pk, increment] // unique identifier for the lesson category created datetime [default: `now()`] // timestamp when the category was created updated datetime // timestamp when the category was last updated // value field cat_name varchar // image file name cat_image varchar // image representing the category lesson_type_id integer [ref: > LessonTypes.id] // foreign key referencing LessonTypes.id } Table Helloworlds { // system field id int [pk, increment] // id field, increment created datetime [default: `now()`] // record create time updated datetime // record update time } Table Users { // system field id int [pk, increment] created datetime [default: `now()`] updated datetime // value field email varchar emailVisibility boolean verified boolean name varchar avatar blob } Table UserMetas { // system field id int [pk, increment] created datetime [default: `now()`] updated datetime // value field helloworld varchar app_on_time_s integer user_id integer [ref: > Users.id] } Table QuizCategories { // system field id int [pk, increment] created datetime [default: `now()`] updated datetime // value field cat_name varchar // category name cat_image varchar // category image } // stores all questions of matching frenzy Table QuizMatchings { // system field id int [pk, increment] // id field, increment created datetime [default: `now()`] // record create time updated datetime // record update time // value field word varchar // modal answer word_c varchar // question cat_id integer [ref: > QuizCategories.id] // foreign key to QuizCategories.id } // QuizListening stores all listening quiz data Table QuizListenings { // system field id int [pk, increment] // id field, increment created datetime [default: `now()`] // record create time updated datetime // record update time // value field sound varchar // URL to the sound file word varchar // The word in the quiz cat_id integer [ref: > QuizCategories.id] } // stores all categories of connectives revision quiz Table QuizConnectivesCategories { // system field id int [pk, increment] // id field, increment created datetime [default: `now()`] // record create time updated datetime // record update time // value field cat_name varchar // category name cat_image varchar // category image } // stores all questions of connectives revision quiz Table QuizConnectives { // system field id int [pk, increment] // id field, increment created datetime [default: `now()`] // record create time updated datetime // record update time // value field question_fh varchar // first half question_sh varchar // second half modal_ans varchar // modal ans cat_id integer [ref: > QuizConnectivesCategories.id] // foreign key to QuizConnectivesCategories.id } // Lessons stores all lessons in the database Table Vocabularies { // system field id int [pk, increment] // unique identifier for the lesson created datetime [default: `now()`] // timestamp when the lesson was created updated datetime // timestamp when the lesson was last updated // value field image varchar // URL to the image associated with the lesson sound varchar // URL to the sound file associated with the lesson word varchar // The word in English word_c varchar // The word in Chinese sample_e varchar // Sample sentence in English using the word sample_c varchar // Sample sentence in Chinese using the word cat_id integer [ref: > LessonCategories.id] // foreign key referring to LessonCategories.id category varchar // The category to which the lesson belongs lesson_type_id integer [ref: > LessonTypes.id] // foreign key referring to LessonTypes.id } // Listening Practice Quiz Categories // store listening practice category, (LpCategories, LpCategory) Table QuizLPCategories { // system fields id text [pk] // changed from int to text to match PocketBase created datetime [default: `now()`] updated datetime // value fields cat_name varchar [presentable: true] // added presentable flag cat_image file // changed from blob to file type pos number // changed from integer to number init_answer json } // Listening Practice Quiz Questions Table QuizLPQuestions { id int [pk, increment] created datetime [default: `now()`] updated datetime word varchar sound blob cat_id integer [ref: > QuizLPCategories.id] } // Matching Frenzy Quiz Categories Table QuizMFCategories { id int [pk, increment] created datetime [default: `now()`] updated datetime cat_name varchar cat_image blob pos integer init_answer json } // Matching Frenzy Quiz Questions Table QuizMFQuestions { id int [pk, increment] created datetime [default: `now()`] updated datetime word varchar word_c varchar cat_id integer [ref: > QuizMFCategories.id] } // Connectives Revision Quiz Categories Table QuizCRCategories { id int [pk, increment] created datetime [default: `now()`] updated datetime cat_name varchar cat_image blob pos integer init_answer json } // Connectives Revision Quiz Questions Table QuizCRQuestions { id int [pk, increment] created datetime [default: `now()`] updated datetime question_fh varchar question_sh varchar modal_ans varchar cat_id integer [ref: > QuizCRCategories.id] } // Test table Table t1 { id int [pk, increment] created datetime [default: `now()`] updated datetime name varchar }