diff --git a/src/models/Account.ts b/src/models/Account.ts index 1af607d..11c18da 100644 --- a/src/models/Account.ts +++ b/src/models/Account.ts @@ -22,7 +22,7 @@ export interface AccountInterface extends Document { authTag: Buffer } -const Account: Schema = new Schema({ +const Account = new Schema({ username: String, userID: String, homepath: String, diff --git a/src/models/Domain.ts b/src/models/Domain.ts index ee8ade0..de6add9 100644 --- a/src/models/Domain.ts +++ b/src/models/Domain.ts @@ -1,24 +1,24 @@ -import { Document, Schema, model } from 'mongoose'; -import { AccountInterface } from './Account'; - -export interface DomainInterface extends Document { - account: AccountInterface, - domain: string, - port: number, - // Below is the full absolute path to the location of the x509 certificate and key files. - x509: { - cert: string, - key: string - }, - enabled: true -} - -const Domain: Schema = new Schema({ - account: Object, - domain: String, - port: Number, - x509: { cert: String, key: String }, - enabled: Boolean, -}); - -export default model('Domain', Domain); +import { Document, Schema, model } from 'mongoose'; +import { AccountInterface } from './Account'; + +export interface DomainInterface extends Document { + account: AccountInterface, + domain: string, + port: number, + // Below is the full absolute path to the location of the x509 certificate and key files. + x509: { + cert: string, + key: string + }, + enabled: true +} + +const Domain = new Schema({ + account: Object, + domain: String, + port: Number, + x509: { cert: String, key: String }, + enabled: Boolean, +}); + +export default model('Domain', Domain); diff --git a/src/models/Moderation.ts b/src/models/Moderation.ts index d289dbf..43d5a3c 100644 --- a/src/models/Moderation.ts +++ b/src/models/Moderation.ts @@ -1,38 +1,38 @@ -import { Document, Schema, model } from 'mongoose'; - -export interface ModerationInterface extends Document { - username: string, - userID: string, - logID: string, - moderatorID: string, - reason: string, - /** - * @field 0 - Create - * @field 1 - Warn - * @field 2 - Lock - * @field 3 - Unlock - * @field 4 - Delete - */ - type: 0 | 1 | 2 | 3 | 4 - date: Date, - expiration: { - date: Date, - processed: boolean - } -} - -const Moderation: Schema = new Schema({ - username: String, - userID: String, - logID: String, - moderatorID: String, - reason: String, - type: Number, - date: Date, - expiration: { - date: Date, - processed: Boolean, - }, -}); - -export default model('Moderation', Moderation); +import { Document, Schema, model } from 'mongoose'; + +export interface ModerationInterface extends Document { + username: string, + userID: string, + logID: string, + moderatorID: string, + reason: string, + /** + * @field 0 - Create + * @field 1 - Warn + * @field 2 - Lock + * @field 3 - Unlock + * @field 4 - Delete + */ + type: 0 | 1 | 2 | 3 | 4 + date: Date, + expiration: { + date: Date, + processed: boolean + } +} + +const Moderation = new Schema({ + username: String, + userID: String, + logID: String, + moderatorID: String, + reason: String, + type: Number, + date: Date, + expiration: { + date: Date, + processed: Boolean, + }, +}); + +export default model('Moderation', Moderation); diff --git a/src/models/Tier.ts b/src/models/Tier.ts index 7542a50..4bf81ed 100644 --- a/src/models/Tier.ts +++ b/src/models/Tier.ts @@ -12,7 +12,7 @@ export interface TierInterface extends Tiers, Document { id: number; } -const Tier: Schema = new Schema({ +const Tier = new Schema({ id: Number, resourceLimits: { ram: Number,