init
This commit is contained in:
38
api/model/biz_usage_monthly.js
Normal file
38
api/model/biz_usage_monthly.js
Normal file
@@ -0,0 +1,38 @@
|
||||
const Sequelize = require("sequelize");
|
||||
|
||||
module.exports = (db) => {
|
||||
return db.define(
|
||||
"biz_usage_monthly",
|
||||
{
|
||||
id: {
|
||||
type: Sequelize.BIGINT.UNSIGNED,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
},
|
||||
user_id: {
|
||||
type: Sequelize.BIGINT.UNSIGNED,
|
||||
allowNull: false,
|
||||
},
|
||||
plan_id: {
|
||||
type: Sequelize.BIGINT.UNSIGNED,
|
||||
allowNull: false,
|
||||
},
|
||||
stat_month: {
|
||||
type: Sequelize.STRING(7),
|
||||
allowNull: false,
|
||||
comment: "YYYY-MM",
|
||||
},
|
||||
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 },
|
||||
},
|
||||
{
|
||||
tableName: "biz_usage_monthly",
|
||||
timestamps: true,
|
||||
underscored: true,
|
||||
comment: "月用量",
|
||||
}
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user