From 83452d5184819458962d026edb84cc86364a3886 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Thu, 17 Oct 2019 15:43:10 -0400 Subject: [PATCH] new domain/port model for CWG --- src/models/Domain.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/models/Domain.ts diff --git a/src/models/Domain.ts b/src/models/Domain.ts new file mode 100644 index 0000000..ee8ade0 --- /dev/null +++ b/src/models/Domain.ts @@ -0,0 +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);