mirror of
https://github.com/Permissionless-Software-Foundation/bch-email-api.git
synced 2026-09-21 16:52:04 -07:00
Added iredmail class and used-quota model
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user