Added iredmail class and used-quota model

This commit is contained in:
Chris Troutner
2019-01-21 17:17:26 -08:00
parent 04ea33cd96
commit c0346f2e32
4 changed files with 94 additions and 30 deletions
+30
View File
@@ -0,0 +1,30 @@
/*
UsedQuota table in the iRedMail postgres database.
The constructor cxpects an instantiation of the sequalize class. Returns a
Sequelize model.
*/
'use strict'
const Sequelize = require('sequelize')
class UsedQuota {
// Expects an instantiation of the sequalize class. Returns a Sequelize model.
constructor (sequelize) {
return sequelize.define(
'used_quota',
{
username: { type: Sequelize.STRING, primaryKey: true },
bytes: Sequelize.BIGINT,
messages: Sequelize.BIGINT,
domain: Sequelize.STRING
},
{
timestamps: false
}
)
}
}
module.exports = UsedQuota