forked from engineering/cloudservices
Definitions inside methods
parent
d534ea163d
commit
52351fd8e4
|
@ -22,7 +22,7 @@ export interface AccountInterface extends Document {
|
|||
authTag: Buffer
|
||||
}
|
||||
|
||||
const Account: Schema = new Schema({
|
||||
const Account = new Schema<AccountInterface>({
|
||||
username: String,
|
||||
userID: String,
|
||||
homepath: String,
|
||||
|
|
|
@ -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<DomainInterface>('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<DomainInterface>({
|
||||
account: Object,
|
||||
domain: String,
|
||||
port: Number,
|
||||
x509: { cert: String, key: String },
|
||||
enabled: Boolean,
|
||||
});
|
||||
|
||||
export default model<DomainInterface>('Domain', Domain);
|
||||
|
|
|
@ -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<ModerationInterface>('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<ModerationInterface>({
|
||||
username: String,
|
||||
userID: String,
|
||||
logID: String,
|
||||
moderatorID: String,
|
||||
reason: String,
|
||||
type: Number,
|
||||
date: Date,
|
||||
expiration: {
|
||||
date: Date,
|
||||
processed: Boolean,
|
||||
},
|
||||
});
|
||||
|
||||
export default model<ModerationInterface>('Moderation', Moderation);
|
||||
|
|
|
@ -12,7 +12,7 @@ export interface TierInterface extends Tiers, Document {
|
|||
id: number;
|
||||
}
|
||||
|
||||
const Tier: Schema = new Schema({
|
||||
const Tier = new Schema<TierInterface>({
|
||||
id: Number,
|
||||
resourceLimits: {
|
||||
ram: Number,
|
||||
|
|
Loading…
Reference in New Issue