feat: implement backend API with models and seed data for OctoFit application

This commit is contained in:
2026-06-20 01:49:15 +00:00
parent 39ef098873
commit f8c4a57e78
17 changed files with 669 additions and 5 deletions
+15
View File
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkoutModel = void 0;
const mongoose_1 = require("mongoose");
const workoutSchema = new mongoose_1.Schema({
title: { type: String, required: true, trim: true },
category: { type: String, required: true, trim: true },
difficulty: { type: String, required: true, trim: true },
durationMinutes: { type: Number, required: true, min: 1 },
equipment: { type: [String], required: true },
targetMuscles: { type: [String], required: true },
}, {
timestamps: true,
});
exports.WorkoutModel = (0, mongoose_1.model)("Workout", workoutSchema);