community-relations/src/models/Redirect.ts

22 lines
409 B
TypeScript
Raw Normal View History

2020-05-05 19:13:27 -04:00
import { Document, Schema, model } from 'mongoose';
export interface RedirectInterface extends Document {
key: string,
to: string,
2020-06-12 16:49:00 -04:00
visitedCount: number,
2020-05-05 19:13:27 -04:00
}
export interface RedirectRaw {
key: string,
to: string,
2020-06-12 16:49:00 -04:00
visitedCount: number,
}
2020-05-05 19:13:27 -04:00
const Redirect: Schema = new Schema({
key: String,
to: String,
2020-06-12 16:49:00 -04:00
visitedCount: Number,
2020-05-05 19:13:27 -04:00
});
export default model<RedirectInterface>('Redirect', Redirect);