@developers-joyride/shortify
Version:
High performance URL shortener library with multi-database support (MongoDB, SQLite, PostgreSQL, MySQL)
20 lines (19 loc) • 600 B
TypeScript
import mongoose, { Document } from "mongoose";
export interface IUrl extends Document {
urlId: string;
originalUrl: string;
shortUrl: string;
clicks: number;
createdAt: Date;
expiresAt?: Date;
}
export declare const Url: mongoose.Model<IUrl, {}, {}, {}, mongoose.Document<unknown, {}, IUrl, {}> & IUrl & Required<{
_id: unknown;
}> & {
__v: number;
}, any>;
export declare function createUrlModel(collectionName?: string): mongoose.Model<IUrl, {}, {}, {}, mongoose.Document<unknown, {}, IUrl, {}> & IUrl & Required<{
_id: unknown;
}> & {
__v: number;
}, any>;