cr-database/models/Stat.ts

14 lines
302 B
TypeScript

import { Document, Schema, model } from 'mongoose';
export interface StatInterface extends Document {
name: 'messages' | 'commands' | 'pages' | 'requests',
value: number,
}
const Stat: Schema = new Schema({
name: String,
value: Number,
});
export default model<StatInterface>('Stat', Stat);