diff --git a/src/models/Tier.ts b/src/models/Tier.ts new file mode 100644 index 0000000..ca9e3cf --- /dev/null +++ b/src/models/Tier.ts @@ -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('Tier', Tier); diff --git a/src/models/index.ts b/src/models/index.ts index 2dc3728..6cac9a8 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,3 +1,4 @@ export { default as Account, AccountInterface } from './Account'; export { default as Moderation, ModerationInterface } from './Moderation'; export { default as Domain, DomainInterface } from './Domain'; +export { default as Tier, TierInterface } from './Tier';