mirror of
https://github.com/farcasclaudiu/learn-build-apps-copilot-agent.git
synced 2026-06-29 11:02:01 +03:00
feat: implement backend API with models and seed data for OctoFit application
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TeamModel = void 0;
|
||||
const mongoose_1 = require("mongoose");
|
||||
const teamSchema = new mongoose_1.Schema({
|
||||
name: { type: String, required: true, trim: true },
|
||||
city: { type: String, required: true, trim: true },
|
||||
captain: { type: mongoose_1.Types.ObjectId, ref: "User", required: true },
|
||||
members: [{ type: mongoose_1.Types.ObjectId, ref: "User", required: true }],
|
||||
}, {
|
||||
timestamps: true,
|
||||
});
|
||||
exports.TeamModel = (0, mongoose_1.model)("Team", teamSchema);
|
||||
Reference in New Issue
Block a user