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
|
|
|
}
|
|
|
|
|
2020-05-16 15:03:21 -04:00
|
|
|
export interface RedirectRaw {
|
|
|
|
key: string,
|
|
|
|
to: string,
|
2020-06-12 16:49:00 -04:00
|
|
|
visitedCount: number,
|
2020-05-16 15:03:21 -04:00
|
|
|
}
|
|
|
|
|
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);
|