Files
wechatWeb/api/model/biz_usage_monthly.js
张成 433077f08a 1
2026-04-01 10:42:33 +08:00

39 lines
1.1 KiB
JavaScript

const Sequelize = require("sequelize");
module.exports = (db) => {
const biz_usage_monthly = db.define(
"biz_usage_monthly",
{
user_id: {
type: Sequelize.BIGINT.UNSIGNED,
allowNull: false,
},
plan_id: {
type: Sequelize.BIGINT.UNSIGNED,
allowNull: false,
},
stat_month: {
type: Sequelize.STRING(7),
allowNull: false,
},
msg_count: { type: Sequelize.INTEGER, allowNull: false, defaultValue: 0 },
mass_count: { type: Sequelize.INTEGER, allowNull: false, defaultValue: 0 },
friend_count: { type: Sequelize.INTEGER, allowNull: false, defaultValue: 0 },
sns_count: { type: Sequelize.INTEGER, allowNull: false, defaultValue: 0 },
active_user_count: { type: Sequelize.INTEGER, allowNull: false, defaultValue: 0 },
api_call_count: {
type: Sequelize.INTEGER,
allowNull: false,
defaultValue: 0,
},
},
{
timestamps: false,
underscored: true,
}
);
// biz_usage_monthly.sync({ alter: true });
return biz_usage_monthly;
};