new domain/port model for CWG

merge-requests/1/merge
Matthew R 2019-10-17 15:43:10 -04:00
parent 5dbd497f88
commit 83452d5184
No known key found for this signature in database
GPG Key ID: 97CA005641E9054C
1 changed files with 24 additions and 0 deletions

24
src/models/Domain.ts Normal file
View File

@ -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<DomainInterface>('Domain', Domain);