This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const { sequelize } = require('../config/database');
|
||||
const { ref } = require('joi');
|
||||
|
||||
const Context = sequelize.define('Context', {
|
||||
uuid: {
|
||||
|
||||
@@ -24,16 +24,9 @@ const Vocab = sequelize.define('Vocab', {
|
||||
allowNull: false,
|
||||
index: true
|
||||
},
|
||||
// Đã xuất hiện trong khối nào, bài học nào, lesson nào
|
||||
// Ví dụ 111 là grade 1, unit 1, lesson 1
|
||||
grade: {
|
||||
type: DataTypes.INTEGER,
|
||||
defaultValue: 0,
|
||||
comment: 'It is number of gradeX100 + unitX10 + lesson (e.g., Grade 1 Unit 2 Lesson 3 = 123)'
|
||||
},
|
||||
// Loại biến thể (V1, V2, V3, V_ing, Noun_Form...)
|
||||
form_key: {
|
||||
type: DataTypes.JSON,
|
||||
type: DataTypes.TEXT,
|
||||
defaultValue: 'base',
|
||||
comment: 'Form key indicating the type of word form (e.g., base, V1, V2, V3, V_ing, Noun_Form)'
|
||||
},
|
||||
@@ -47,10 +40,6 @@ const Vocab = sequelize.define('Vocab', {
|
||||
type: DataTypes.STRING(100),
|
||||
comment: 'Category of the word (e.g., Action Verbs, Nouns)'
|
||||
},
|
||||
etc : {
|
||||
type: DataTypes.TEXT,
|
||||
comment: 'Book or additional reference'
|
||||
},
|
||||
topic: {
|
||||
type: DataTypes.STRING(100),
|
||||
comment: 'Topic of the word (e.g., Food, Travel, Education)'
|
||||
@@ -121,10 +110,6 @@ const Vocab = sequelize.define('Vocab', {
|
||||
{
|
||||
name: 'idx_category',
|
||||
fields: ['category']
|
||||
},
|
||||
{
|
||||
name: 'idx_grade',
|
||||
fields: ['grade']
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user