community-relations/src/models/Redirect.ts

22 lines
409 B
TypeScript

import { Document, Schema, model } from 'mongoose';
export interface RedirectInterface extends Document {
key: string,
to: string,
visitedCount: number,
}
export interface RedirectRaw {
key: string,
to: string,
visitedCount: number,
}
const Redirect: Schema = new Schema({
key: String,
to: String,
visitedCount: Number,
});
export default model<RedirectInterface>('Redirect', Redirect);