You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.5 KiB
71 lines
1.5 KiB
// 数据库连接配置
|
|
require('dotenv').config();
|
|
|
|
module.exports = {
|
|
db: {
|
|
host: '1.95.162.61',
|
|
port: 3306,
|
|
user: 'root',
|
|
password: 'schl@2025',
|
|
database: 'wechat_app'
|
|
},
|
|
|
|
// 数据库表结构配置
|
|
tables: {
|
|
users: {
|
|
name: 'users',
|
|
fields: {
|
|
userId: 'userId',
|
|
nickName: 'nickName',
|
|
phoneNumber: 'phoneNumber'
|
|
}
|
|
},
|
|
userManagements: {
|
|
name: 'usermanagements',
|
|
fields: {
|
|
userId: 'userId',
|
|
userName: 'userName'
|
|
}
|
|
}
|
|
},
|
|
|
|
// 简道云配置
|
|
jiandaoyun: {
|
|
appId: '684bd1da61702bed58d15d13',
|
|
entryId: '6822e45e5b34abd7d81f34b5',
|
|
apiKey: 'JgTzhmiwlwzz4LWl4dJ4FGZ6yr3VqxoW',
|
|
apiUrl: 'https://api.jiandaoyun.com/api/v1'
|
|
},
|
|
|
|
// 字段映射关系
|
|
fieldMapping: {
|
|
'userId': '_widget_1767422700667',
|
|
'userName': '_widget_1747117151082'
|
|
},
|
|
|
|
// 子表字段配置
|
|
subTableFields: {
|
|
'subTable': '_widget_1747117151085',
|
|
'nickName': '_widget_1747117151087',
|
|
'phoneNumber': '_widget_1747117151088'
|
|
},
|
|
|
|
// 同步配置
|
|
sync: {
|
|
// 增量同步模式:true - 只同步新增/未同步数据,false - 同步所有数据
|
|
incremental: true,
|
|
// 同步状态字段
|
|
statusField: 'sync_statuss',
|
|
// 已同步状态值
|
|
syncedValue: 1,
|
|
// 未同步状态值
|
|
unsyncedValue: 0,
|
|
// 自动同步配置
|
|
autoSync: {
|
|
// 是否启用自动同步
|
|
enabled: true,
|
|
// 同步间隔时间(单位:分钟)
|
|
interval: 5
|
|
}
|
|
}
|
|
};
|
|
|