Commit 402d06eb by zhangzhencai

修改了mysqlTableConfig.ts文件

parent 39126a2d
...@@ -24,16 +24,7 @@ export const TablesConfig = [ ...@@ -24,16 +24,7 @@ export const TablesConfig = [
is_del: {type:Sequelize.TIMESTAMP(1)}, //是否删除 0.正常 1.已删除 is_del: {type:Sequelize.TIMESTAMP(1)}, //是否删除 0.正常 1.已删除
}, },
association: [ association: [
{type: "belongsTo", check: "option", foreignKey:"uid"}, {type:"hasMany", check:"option", foreignKey:"qid"}
{type: "hasMany", check: "question_like", foreignKey:"qid"},
{type: "hasMany", check: "question_collect", foreignKey:"qid"},
{type: "hasMany", check: "question_comment", foreignKey:"qid"},
{type: "hasMany", check: "question_report", foreignKey:"qid"},
{type: "hasMany", check: "question_answer", foreignKey:"qid"},
{type: "hasMany", check: "question_answer_like", foreignKey:"qid"},
{type: "hasMany", check: "question_answer_collect", foreignKey:"qid"},
{type: "hasMany", check: "question_answer_comment", foreignKey:"qid"},
{type: "hasMany", check: "question_answer_report", foreignKey:"qid"}
] ]
}, },
{ {
...@@ -56,16 +47,7 @@ export const TablesConfig = [ ...@@ -56,16 +47,7 @@ export const TablesConfig = [
is_del: {type:Sequelize.tinyint(1)}, //是否删除 0.正常 1.已删除 is_del: {type:Sequelize.tinyint(1)}, //是否删除 0.正常 1.已删除
}, },
association: [ association: [
{type: "belongsTo", check: "question", foreignKey:"qid"}, {type: "hasMany", check: "question", foreignKey: "qid"}
{type: "hasMany", check: "option_like", foreignKey:"oid"},
{type: "hasMany", check: "option_collect", foreignKey:"oid"},
{type: "hasMany", check: "option_comment", foreignKey:"oid"},
{type: "hasMany", check: "option_report", foreignKey:"oid"},
{type: "hasMany", check: "option_answer", foreignKey:"oid"},
{type: "hasMany", check: "option_answer_like", foreignKey:"oid"},
{type: "hasMany", check: "option_answer_collect", foreignKey:"oid"},
{type: "hasMany", check: "option_answer_comment", foreignKey:"oid"},
{type: "hasMany", check: "option_answer_report", foreignKey:"oid"}
] ]
}, },
{ {
...@@ -115,9 +97,7 @@ export const TablesConfig = [ ...@@ -115,9 +97,7 @@ export const TablesConfig = [
second_highest_letter: {type:Sequelize.tinyint}, //第二高分字母 second_highest_letter: {type:Sequelize.tinyint}, //第二高分字母
third_highest_letter: {type:Sequelize.tinyint}, //第三高分字母 third_highest_letter: {type:Sequelize.tinyint}, //第三高分字母
}, },
association: [ association: []
// {type: "hasMany", check: "test_answer", foreignKey:"infoid"}
]
}, },
{ {
tableNameCn:'信息记录表', tableNameCn:'信息记录表',
...@@ -138,9 +118,7 @@ export const TablesConfig = [ ...@@ -138,9 +118,7 @@ export const TablesConfig = [
create_time: {type:Sequelize.TIMESTAMP(0),allowNull:false}, //创建时间 create_time: {type:Sequelize.TIMESTAMP(0),allowNull:false}, //创建时间
is_del: {type:Sequelize.tinyint(1),allowNull:false}, //是否删除 0.正常 1.已删除 is_del: {type:Sequelize.tinyint(1),allowNull:false}, //是否删除 0.正常 1.已删除
}, },
association: [ association: []
// {type: "belongsTo", check: "testinfo", foreignKey:"infoid"}
]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment