Commit 8a6e89da by chenjinjing

no message

parent 00057648
<config>
<port>9096</port>
<port>40012</port>
<sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign>
<mysqldb>
<!-- 本地mysql配置 -->
<mysqlHost>192.168.0.105</mysqlHost>
<mysqlHost>192.168.0.71</mysqlHost>
<!-- <mysqlHost>127.0.0.1</mysqlHost> -->
<mysqlPort>3306</mysqlPort>
<mysqlUser>root</mysqlUser>
......
import { STATE } from "./enum";
const Sequelize = require('sequelize');
export const TablesConfig = [
......@@ -54,7 +56,8 @@ export const TablesConfig = [
virtualCause: {type:Sequelize.STRING(255)}, //虚拟孵化原因
virtualCauseDes: {type:Sequelize.STRING(255)}, //虚拟孵化描述
moveOutType: {type:Sequelize.INTEGER}, //迁出类型 毕业迁出,非毕业迁出
moveOutTrace: {type:Sequelize.STRING(255)}, //迁出去向
//moveOutTrace: {type:Sequelize.STRING(255)}, //迁出去向 二期修改,需要调整数据库
moveOutTrace: {type:Sequelize.INTEGER}, //迁出去向
moveOutCause: {type:Sequelize.STRING(255)}, //迁出原因
moveOutTime: {type:Sequelize.DATE}, //迁出时间
graduationTime: {type:Sequelize.DATE}, //毕业时间
......@@ -464,7 +467,7 @@ export const TablesConfig = [
unique:true //表示该列的值必须唯一
},
building: {type: Sequelize.STRING(255)},//楼号(1,3,4)
occupancyRate: {type: Sequelize.STRING(255)},//入驻率
occupancyRate: {type: Sequelize.STRING(255)},//入驻率 出租率 孵化率 入孵率
enteredEnterprises: {type: Sequelize.STRING(255)},//入驻企业
},
association: []
......@@ -1043,7 +1046,13 @@ export const TablesConfig = [
register:{type:Sequelize.INTEGER},//入孵申请状态 0=未审核 1=已驳回 2=已通过
state:{type:Sequelize.INTEGER},//入孵材料审核状态 0=未审核 1=已驳回 2=已通过
//临时填充信息用的验证码
randomCode:{type:Sequelize.STRING(255)}
randomCode:{type:Sequelize.STRING(255)},
/**二期新增字段 */
// createTime:{type:Sequelize.DATE},
// hasUnreadReminder: {type:Sequelize.INTEGER, defaultValue:0}, // 是否有未读提醒 0=无 1=有
// lastReminderTime: {type:Sequelize.DATE}, // 最后提醒时间
emailReminder: {type:Sequelize.INTEGER, defaultValue:1}, //是否发送邮件提醒 0=否 1=是
isNewApplication: {type:Sequelize.INTEGER, defaultValue:0}, //管理员是否已查看新申请 0=否,未查看 1=是,已查看
},
association: [
{type: "hasMany", check: "enterprise_fuhua", foreignKey:"eId"},
......@@ -1084,11 +1093,13 @@ export const TablesConfig = [
{type:"hasMany", check:"patent", foreignKey:"eId"},
{type:"hasMany", check:"gaoxin_answerrecord", foreignKey:"eId"},
{type:"hasMany", check:"zufang_answerrecord", foreignKey:"eId"},
{type:"hasMany", check:"message_reminder", foreignKey:"eId"},
{type:"hasMany", check:"message_reads", foreignKey:"eId"},
]
},
{
tableNameCn:'管理后台用户',
tableName:'adminUser',
tableName:'adminuser',
schema:{
aId: {
type:Sequelize.STRING(255), //表示属性的数据类型
......@@ -1104,5 +1115,102 @@ export const TablesConfig = [
},
association: []
},
{
tableNameCn:'消息提醒表',
tableName:'message_reminder',
schema:{
mrId: {
type:Sequelize.STRING(255),
allowNull:false,
primaryKey:true,
unique:true
},
eId: {type:Sequelize.STRING(255)}, // 关联企业id,可为空(系统消息)
targetType: {type:Sequelize.INTEGER, allowNull:false}, // 目标类型 1=管理员 2=企业
messageType: {type:Sequelize.INTEGER, allowNull:false}, // 消息类型
title: {type:Sequelize.STRING(255), allowNull:false}, // 消息标题
content: {type:Sequelize.TEXT}, // 消息内容
isRead: {type:Sequelize.INTEGER, defaultValue:0}, // 是否已读 0=未读 1=已读
relatedId: {type:Sequelize.STRING(255)}, // 关联的业务ID
createTimeMs: {type:Sequelize.DATE}, // 创建时间
readTimeMs: {type:Sequelize.DATE}, // 阅读时间
},
association: []
},
// {
// tableNameCn: '企业消息通知表',
// tableName: 'enterprise_notification',
// schema: {
// notId: {
// type: Sequelize.STRING(50),
// allowNull: false,
// primaryKey: true,
// unique: true
// },
// eId: {type: Sequelize.STRING(255)},//企业ID(为空表示发给所有企业)
// targetType: {type: Sequelize.INTEGER, allowNull: false, defaultValue: 2}, //目标类型 1=管理员 2=企业
// noticeType: {type: Sequelize.INTEGER, allowNull: false}, //通知类型
// noticeTitle: {type: Sequelize.STRING(200), allowNull: false}, //通知标题
// noticeContent: {type: Sequelize.STRING(500), allowNull: false}, //通知内容
// isDynamic: {type: Sequelize.INTEGER, defaultValue: 0}, //是否为动态消息 0=静态 1=动态
// dynamicKey: {type: Sequelize.STRING(100)}, //动态消息唯一标识
// templateContent: {type: Sequelize.STRING(500)}, //消息模板内容
// templateData: {type: Sequelize.STRING(500)}, //模板数据
// relatedId: {type: Sequelize.STRING(50)}, //关联业务ID
// relatedType: {type: Sequelize.STRING(50)}, //关联业务类型
// isRead: {type: Sequelize.INTEGER, defaultValue: 0}, //是否已读 0=未读 1=已读
// isActive: {type: Sequelize.INTEGER, defaultValue: 1}, //是否有效 0=无效 1=有效
// expireTime: {type: Sequelize.DATE}, //过期时间
// readTime: {type: Sequelize.DATE}, //阅读时间
// createdTime: {type: Sequelize.DATE}, //创建时间
// updatedTime: {type: Sequelize.DATE} //更新时间
// },
// association: []
// },
{
tableNameCn:'企业消息通知表',
tableName:'message_notice',
schema:{
msgId: { //消息id
type:Sequelize.STRING(255),
allowNull:false,
primaryKey:true,
unique:true
},
msgType:{type:Sequelize.INTEGER, allowNull:false}, //消息类型 1=季度填报提醒
msgTitle:{type:Sequelize.STRING(255)}, //消息标题
createTime:{type:Sequelize.DATE}, //创建时间
effectiveTime:{type:Sequelize.DATE}, //有效时间
msgContent:{type:Sequelize.STRING(500)}, //消息内容
eId:{type:Sequelize.TEXT, default:[]}, //企业ID(为空[]表示发给所有企业)外键
isPop:{type:Sequelize.INTEGER, default:STATE.} //是否弹窗
},
association: [
{type:"hasMany", check:"message_reads", foreignKey:"eId"},
]
},
{
tableNameCn:'企业消息已读状态表',
tableName:'message_reads',
schema:{
readId: { //消息已读id
type:Sequelize.STRING(255),
allowNull:false,
primaryKey:true,
unique:true
},
msgId:{type:Sequelize.STRING(255)}, //消息id
eId:{type:Sequelize.STRING(255), allowNull:false}, //企业ID
readTime:{type:Sequelize.DATE}, //阅读时间
isRead:{type:Sequelize.INTEGER, default:STATE.} //是否已读
},
association: []
},
];
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