1
0
Fork 0

add tier model

refactor/models
Matthew 2020-05-02 02:35:25 -04:00
parent 8df5589242
commit 688e243839
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
2 changed files with 22 additions and 0 deletions

21
src/models/Tier.ts Normal file
View File

@ -0,0 +1,21 @@
import { Document, Schema, model } from 'mongoose';
export interface TierInterface extends Document {
id: number,
resourceLimits: {
// in MB
ram: number,
// in MB
storage: number,
},
}
const Tier: Schema = new Schema({
id: Number,
resourceLimits: {
ram: Number,
storage: Number,
},
}, { id: false });
export default model<TierInterface>('Tier', Tier);

View File

@ -1,3 +1,4 @@
export { default as Account, AccountInterface } from './Account'; export { default as Account, AccountInterface } from './Account';
export { default as Moderation, ModerationInterface } from './Moderation'; export { default as Moderation, ModerationInterface } from './Moderation';
export { default as Domain, DomainInterface } from './Domain'; export { default as Domain, DomainInterface } from './Domain';
export { default as Tier, TierInterface } from './Tier';