Files
coolify/src/models/Logs/Server.ts
Andras Bacsai 23a4ebb74a v1.0.12 - Sveltekit migration (#44)
Changed the whole tech stack to SvelteKit which means:
- Typescript 
- SSR
- No fastify :(
- Beta, but it's fine!

Other changes:
- Tailwind -> Tailwind JIT
- A lot more
2021-05-14 21:51:14 +02:00

24 lines
670 B
TypeScript

import mongoose from 'mongoose';
import { version } from '../../../package.json';
const { Schema, Document } = mongoose;
// export interface ILogsServer extends Document {
// version: string;
// type: string;
// message: string;
// stack: string;
// seen: Boolean;
// }
const LogsServerSchema = new Schema({
version: { type: String, default: version },
type: { type: String, required: true },
message: { type: String, required: true },
stack: { type: String },
seen: { type: Boolean, default: false }
});
LogsServerSchema.set('timestamps', { createdAt: 'createdAt', updatedAt: false });
export default mongoose.model('logs-server', LogsServerSchema);