Many an update!

This commit is contained in:
Jennie Robinson Faber 2025-12-01 15:26:42 +00:00
parent 85195d6c7a
commit d588c49946
35 changed files with 3528 additions and 1142 deletions

View file

@ -0,0 +1,228 @@
import mongoose from 'mongoose';
import Event from '../server/models/event.js';
import dotenv from 'dotenv';
dotenv.config();
const MONGODB_URI = process.env.NUXT_MONGODB_URI;
const SERIES_ID = 'cooperative-values-into-practice'; // From the series collection
const moduleEvents = [
{
title: 'Module 0: Orientation',
slug: 'cooperative-values-module-0-orientation',
tagline: 'Welcome to Cooperative Values into Practice',
description: 'An introduction to the series and what to expect',
content: 'Welcome to the Cooperative Values into Practice series. This orientation module will introduce you to the program structure and learning objectives.',
startDate: new Date('2025-11-01T18:00:00.000Z'),
endDate: new Date('2025-11-01T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
targetCircles: [],
agenda: [],
speakers: [],
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 0,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 1: Principles',
slug: 'cooperative-values-module-1-principles',
tagline: 'Core principles of cooperative organizations',
description: 'Learn the foundational principles that guide cooperative businesses',
content: 'Explore the core principles of cooperative organizations and how they apply to game development studios.',
startDate: new Date('2025-11-01T18:00:00.000Z'),
endDate: new Date('2025-11-01T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
targetCircles: [],
agenda: [],
speakers: [],
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 1,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 2: Purpose',
slug: 'cooperative-values-module-2-purpose',
tagline: 'Defining your cooperative purpose',
description: 'Establish the mission and values of your cooperative studio',
content: 'Learn how to define and articulate your cooperative studio\'s purpose, mission, and core values.',
startDate: new Date('2025-11-22T18:00:00.000Z'),
endDate: new Date('2025-11-22T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
targetCircles: [],
agenda: [],
speakers: [],
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 2,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 3: Practices Part 1 - Meetings & Decision-Making',
slug: 'cooperative-values-module-3-practices-part-1',
tagline: 'Democratic practices for effective collaboration',
description: 'Learn meeting facilitation and consensus decision-making processes',
content: 'Develop practical skills in democratic meeting facilitation and collaborative decision-making.',
startDate: new Date('2025-12-20T18:00:00.000Z'),
endDate: new Date('2025-12-20T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
targetCircles: [],
agenda: [],
speakers: [],
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 3,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 4: Practices Part 2 - Finances & Governance',
slug: 'cooperative-values-module-4-practices-part-2',
tagline: 'Financial management and governance structures',
description: 'Explore cooperative financial models and governance frameworks',
content: 'Learn about cooperative financial management, governance structures, and accountability practices.',
startDate: new Date('2026-01-17T18:00:00.000Z'),
endDate: new Date('2026-01-17T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
targetCircles: [],
agenda: [],
speakers: [],
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 4,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 5: Pathways Forward',
slug: 'cooperative-values-module-5-pathways-forward',
tagline: 'Creating your action plan',
description: 'Develop your roadmap for implementing cooperative values',
content: 'Create a concrete action plan for implementing cooperative values and practices in your studio.',
startDate: new Date('2026-02-14T18:00:00.000Z'),
endDate: new Date('2026-02-14T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
targetCircles: [],
agenda: [],
speakers: [],
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 5,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
}
];
async function addModuleEvents() {
try {
await mongoose.connect(MONGODB_URI);
console.log('Connected to Atlas');
// Check if any Module events already exist
const existing = await Event.find({ title: /^Module/ });
if (existing.length > 0) {
console.log(`Found ${existing.length} existing Module events. Deleting them first...`);
await Event.deleteMany({ title: /^Module/ });
}
// Insert the module events
console.log(`Inserting ${moduleEvents.length} Module events...`);
const inserted = await Event.insertMany(moduleEvents);
console.log(`✓ Successfully inserted ${inserted.length} Module events`);
console.log('\nModule events created:');
inserted.forEach(e => {
console.log(` - ${e.title} (${e.startDate.toISOString().split('T')[0]})`);
});
// Verify
const total = await Event.countDocuments();
const visible = await Event.countDocuments({ isVisible: true });
console.log(`\nTotal events in Atlas: ${total}`);
console.log(`Visible events in Atlas: ${visible}`);
process.exit(0);
} catch (error) {
console.error('Error:', error);
process.exit(1);
}
}
addModuleEvents();

View file

@ -0,0 +1,203 @@
import mongoose from 'mongoose';
import Event from '../server/models/event.js';
import dotenv from 'dotenv';
dotenv.config();
const MONGODB_URI = process.env.NUXT_MONGODB_URI;
const SERIES_ID = '68eb9c00689e559d9e46322e'; // Cooperative Values into Practice
const moduleEvents = [
{
title: 'Module 0: Orientation',
slug: 'cooperative-values-module-0-orientation',
tagline: 'Welcome to Cooperative Values into Practice',
description: 'An introduction to the series and what to expect',
content: 'Welcome to the Cooperative Values into Practice series. This orientation module will introduce you to the program structure and learning objectives.',
startDate: new Date('2025-11-01T18:00:00.000Z'),
endDate: new Date('2025-11-01T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 0,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 1: Principles',
slug: 'cooperative-values-module-1-principles',
tagline: 'Core principles of cooperative organizations',
description: 'Learn the foundational principles that guide cooperative businesses',
content: 'Explore the core principles of cooperative organizations and how they apply to game development studios.',
startDate: new Date('2025-11-01T18:00:00.000Z'),
endDate: new Date('2025-11-01T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 1,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 2: Purpose',
slug: 'cooperative-values-module-2-purpose',
tagline: 'Defining your cooperative purpose',
description: 'Establish the mission and values of your cooperative studio',
content: 'Learn how to define and articulate your cooperative studio\'s purpose, mission, and core values.',
startDate: new Date('2025-11-22T18:00:00.000Z'),
endDate: new Date('2025-11-22T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 2,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 3: Practices Part 1 - Meetings & Decision-Making',
slug: 'cooperative-values-module-3-practices-part-1',
tagline: 'Democratic practices for effective collaboration',
description: 'Learn meeting facilitation and consensus decision-making processes',
content: 'Develop practical skills in democratic meeting facilitation and collaborative decision-making.',
startDate: new Date('2025-12-20T18:00:00.000Z'),
endDate: new Date('2025-12-20T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 3,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 4: Practices Part 2 - Finances & Governance',
slug: 'cooperative-values-module-4-practices-part-2',
tagline: 'Financial management and governance structures',
description: 'Explore cooperative financial models and governance frameworks',
content: 'Learn about cooperative financial management, governance structures, and accountability practices.',
startDate: new Date('2026-01-17T18:00:00.000Z'),
endDate: new Date('2026-01-17T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 4,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
},
{
title: 'Module 5: Pathways Forward',
slug: 'cooperative-values-module-5-pathways-forward',
tagline: 'Creating your action plan',
description: 'Develop your roadmap for implementing cooperative values',
content: 'Create a concrete action plan for implementing cooperative values and practices in your studio.',
startDate: new Date('2026-02-14T18:00:00.000Z'),
endDate: new Date('2026-02-14T20:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-series',
isOnline: true,
isVisible: true,
isCancelled: false,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: SERIES_ID,
title: 'Cooperative Values into Practice',
description: 'Creating a democratic and inclusive game studio',
type: 'course',
position: 5,
totalEvents: 6,
isSeriesEvent: true
},
createdBy: 'admin'
}
];
async function addModuleEvents() {
try {
await mongoose.connect(MONGODB_URI);
console.log('Connected to Atlas');
// Check if any Module events already exist
const existing = await Event.find({ title: /^Module/ });
if (existing.length > 0) {
console.log(`Found ${existing.length} existing Module events. Deleting them first...`);
await Event.deleteMany({ title: /^Module/ });
}
// Insert the module events
console.log(`Inserting ${moduleEvents.length} Module events...`);
const inserted = await Event.insertMany(moduleEvents);
console.log(`✓ Successfully inserted ${inserted.length} Module events`);
// Verify
const total = await Event.countDocuments();
console.log(`\nTotal events in Atlas: ${total}`);
process.exit(0);
} catch (error) {
console.error('Error:', error);
process.exit(1);
}
}
addModuleEvents();

View file

@ -1,44 +1,47 @@
import mongoose from 'mongoose'
import { connectDB } from '../server/utils/mongoose.js'
import dotenv from 'dotenv'
import mongoose from "mongoose";
import { connectDB } from "../server/utils/mongoose.js";
import dotenv from "dotenv";
// Load environment variables
dotenv.config()
dotenv.config();
// Import seed functions
import { execSync } from 'child_process'
import { execSync } from "child_process";
async function seedAll() {
try {
console.log('🌱 Starting database seeding...\n')
console.log("🌱 Starting database seeding...\n");
// Seed members
console.log('👥 Seeding members...')
execSync('node scripts/seed-members.js', { stdio: 'inherit' })
console.log('\n🎉 Seeding events...')
execSync('node scripts/seed-events.js', { stdio: 'inherit' })
console.log('\n✅ All data seeded successfully!')
console.log('\n📊 Database Summary:')
console.log("👥 Seeding members...");
execSync("node scripts/seed-members.js", { stdio: "inherit" });
console.log("\n🎉 Seeding events...");
execSync("node scripts/seed-events.js", { stdio: "inherit" });
console.log("\n📅 Seeding series events...");
execSync("node scripts/seed-series-events.js", { stdio: "inherit" });
console.log("\n✅ All data seeded successfully!");
console.log("\n📊 Database Summary:");
// Connect and show final counts
await connectDB()
const Member = (await import('../server/models/member.js')).default
const Event = (await import('../server/models/event.js')).default
const memberCount = await Member.countDocuments()
const eventCount = await Event.countDocuments()
console.log(` Members: ${memberCount}`)
console.log(` Events: ${eventCount}`)
process.exit(0)
await connectDB();
const Member = (await import("../server/models/member.js")).default;
const Event = (await import("../server/models/event.js")).default;
const memberCount = await Member.countDocuments();
const eventCount = await Event.countDocuments();
console.log(` Members: ${memberCount}`);
console.log(` Events: ${eventCount}`);
process.exit(0);
} catch (error) {
console.error('❌ Error seeding database:', error)
process.exit(1)
console.error("❌ Error seeding database:", error);
process.exit(1);
}
}
seedAll()
seedAll();

View file

@ -1,187 +1,220 @@
import { connectDB } from '../server/utils/mongoose.js'
import Event from '../server/models/event.js'
import { connectDB } from "../server/utils/mongoose.js";
import Event from "../server/models/event.js";
async function seedSeriesEvents() {
try {
await connectDB()
console.log('Connected to database')
await connectDB();
console.log("Connected to database");
// Generate future dates relative to today
const today = new Date();
// Workshop Series: "Cooperative Game Development Fundamentals"
const workshopSeries = [
{
title: 'Cooperative Business Models in Game Development',
slug: 'coop-business-models-workshop',
tagline: 'Learn the foundations of cooperative business structures',
description: 'An introductory workshop covering the basic principles and structures of worker cooperatives in the game development industry.',
content: 'This workshop will cover the legal structures, governance models, and financial frameworks that make cooperative game studios successful.',
startDate: new Date('2024-10-15T19:00:00.000Z'),
endDate: new Date('2024-10-15T21:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-fundamentals',
title: "Cooperative Business Models in Game Development",
slug: "coop-business-models-workshop",
tagline: "Learn the foundations of cooperative business structures",
description:
"An introductory workshop covering the basic principles and structures of worker cooperatives in the game development industry.",
content:
"This workshop will cover the legal structures, governance models, and financial frameworks that make cooperative game studios successful.",
startDate: new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() + 15,
19,
0,
),
endDate: new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() + 15,
21,
0,
),
eventType: "workshop",
location: "#workshop-fundamentals",
isOnline: true,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: 'coop-dev-fundamentals',
title: 'Cooperative Game Development Fundamentals',
description: 'A comprehensive workshop series covering the essentials of building and running cooperative game studios',
type: 'workshop_series',
id: "coop-dev-fundamentals",
title: "Cooperative Game Development Fundamentals",
description:
"A comprehensive workshop series covering the essentials of building and running cooperative game studios",
type: "workshop_series",
position: 1,
totalEvents: 4,
isSeriesEvent: true
isSeriesEvent: true,
},
createdBy: 'admin'
createdBy: "admin",
},
{
title: 'Democratic Decision Making in Creative Projects',
slug: 'democratic-decision-making-workshop',
tagline: 'Practical tools for collaborative project management',
description: 'Learn how to implement democratic decision-making processes that work for creative teams and game development projects.',
content: 'This workshop focuses on consensus building, conflict resolution, and collaborative project management techniques.',
startDate: new Date('2024-10-22T19:00:00.000Z'),
endDate: new Date('2024-10-22T21:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-fundamentals',
title: "Democratic Decision Making in Creative Projects",
slug: "democratic-decision-making-workshop",
tagline: "Practical tools for collaborative project management",
description:
"Learn how to implement democratic decision-making processes that work for creative teams and game development projects.",
content:
"This workshop focuses on consensus building, conflict resolution, and collaborative project management techniques.",
startDate: new Date("2024-10-22T19:00:00.000Z"),
endDate: new Date("2024-10-22T21:00:00.000Z"),
eventType: "workshop",
location: "#workshop-fundamentals",
isOnline: true,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: 'coop-dev-fundamentals',
title: 'Cooperative Game Development Fundamentals',
description: 'A comprehensive workshop series covering the essentials of building and running cooperative game studios',
type: 'workshop_series',
id: "coop-dev-fundamentals",
title: "Cooperative Game Development Fundamentals",
description:
"A comprehensive workshop series covering the essentials of building and running cooperative game studios",
type: "workshop_series",
position: 2,
totalEvents: 4,
isSeriesEvent: true
isSeriesEvent: true,
},
createdBy: 'admin'
createdBy: "admin",
},
{
title: 'Funding and Financial Models for Co-ops',
slug: 'coop-funding-workshop',
tagline: 'Sustainable financing for cooperative studios',
description: 'Explore funding options, revenue sharing models, and financial management strategies specific to cooperative game studios.',
content: 'This workshop covers grant opportunities, crowdfunding strategies, and internal financial management for worker cooperatives.',
startDate: new Date('2024-10-29T19:00:00.000Z'),
endDate: new Date('2024-10-29T21:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-fundamentals',
title: "Funding and Financial Models for Co-ops",
slug: "coop-funding-workshop",
tagline: "Sustainable financing for cooperative studios",
description:
"Explore funding options, revenue sharing models, and financial management strategies specific to cooperative game studios.",
content:
"This workshop covers grant opportunities, crowdfunding strategies, and internal financial management for worker cooperatives.",
startDate: new Date("2024-10-29T19:00:00.000Z"),
endDate: new Date("2024-10-29T21:00:00.000Z"),
eventType: "workshop",
location: "#workshop-fundamentals",
isOnline: true,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: 'coop-dev-fundamentals',
title: 'Cooperative Game Development Fundamentals',
description: 'A comprehensive workshop series covering the essentials of building and running cooperative game studios',
type: 'workshop_series',
id: "coop-dev-fundamentals",
title: "Cooperative Game Development Fundamentals",
description:
"A comprehensive workshop series covering the essentials of building and running cooperative game studios",
type: "workshop_series",
position: 3,
totalEvents: 4,
isSeriesEvent: true
isSeriesEvent: true,
},
createdBy: 'admin'
createdBy: "admin",
},
{
title: 'Building Your Cooperative Studio',
slug: 'building-coop-studio-workshop',
tagline: 'From concept to reality: launching your co-op',
description: 'A practical guide to forming a cooperative game studio, covering legal formation, member recruitment, and launch strategies.',
content: 'This final workshop in the series provides a step-by-step guide to actually forming and launching a cooperative game studio.',
startDate: new Date('2024-11-05T19:00:00.000Z'),
endDate: new Date('2024-11-05T21:00:00.000Z'),
eventType: 'workshop',
location: '#workshop-fundamentals',
title: "Building Your Cooperative Studio",
slug: "building-coop-studio-workshop",
tagline: "From concept to reality: launching your co-op",
description:
"A practical guide to forming a cooperative game studio, covering legal formation, member recruitment, and launch strategies.",
content:
"This final workshop in the series provides a step-by-step guide to actually forming and launching a cooperative game studio.",
startDate: new Date("2024-11-05T19:00:00.000Z"),
endDate: new Date("2024-11-05T21:00:00.000Z"),
eventType: "workshop",
location: "#workshop-fundamentals",
isOnline: true,
membersOnly: false,
registrationRequired: true,
maxAttendees: 50,
series: {
id: 'coop-dev-fundamentals',
title: 'Cooperative Game Development Fundamentals',
description: 'A comprehensive workshop series covering the essentials of building and running cooperative game studios',
type: 'workshop_series',
id: "coop-dev-fundamentals",
title: "Cooperative Game Development Fundamentals",
description:
"A comprehensive workshop series covering the essentials of building and running cooperative game studios",
type: "workshop_series",
position: 4,
totalEvents: 4,
isSeriesEvent: true
isSeriesEvent: true,
},
createdBy: 'admin'
}
]
createdBy: "admin",
},
];
// Monthly Community Meetup Series
const meetupSeries = [
{
title: 'October Community Meetup',
slug: 'october-community-meetup',
tagline: 'Monthly gathering for cooperative game developers',
description: 'Join fellow cooperative game developers for informal networking, project sharing, and community building.',
content: 'Our monthly community meetup provides a relaxed environment to share your projects, get feedback, and connect with other developers interested in cooperative models.',
startDate: new Date('2024-10-12T18:00:00.000Z'),
endDate: new Date('2024-10-12T20:00:00.000Z'),
eventType: 'community',
location: '#community-meetup',
title: "October Community Meetup",
slug: "october-community-meetup",
tagline: "Monthly gathering for cooperative game developers",
description:
"Join fellow cooperative game developers for informal networking, project sharing, and community building.",
content:
"Our monthly community meetup provides a relaxed environment to share your projects, get feedback, and connect with other developers interested in cooperative models.",
startDate: new Date("2024-10-12T18:00:00.000Z"),
endDate: new Date("2024-10-12T20:00:00.000Z"),
eventType: "community",
location: "#community-meetup",
isOnline: true,
membersOnly: false,
registrationRequired: false,
series: {
id: 'monthly-meetups',
title: 'Monthly Community Meetups',
description: 'Regular monthly gatherings for the cooperative game development community',
type: 'recurring_meetup',
id: "monthly-meetups",
title: "Monthly Community Meetups",
description:
"Regular monthly gatherings for the cooperative game development community",
type: "recurring_meetup",
position: 1,
totalEvents: 12,
isSeriesEvent: true
isSeriesEvent: true,
},
createdBy: 'admin'
createdBy: "admin",
},
{
title: 'November Community Meetup',
slug: 'november-community-meetup',
tagline: 'Monthly gathering for cooperative game developers',
description: 'Join fellow cooperative game developers for informal networking, project sharing, and community building.',
content: 'Our monthly community meetup provides a relaxed environment to share your projects, get feedback, and connect with other developers interested in cooperative models.',
startDate: new Date('2024-11-09T18:00:00.000Z'),
endDate: new Date('2024-11-09T20:00:00.000Z'),
eventType: 'community',
location: '#community-meetup',
title: "November Community Meetup",
slug: "november-community-meetup",
tagline: "Monthly gathering for cooperative game developers",
description:
"Join fellow cooperative game developers for informal networking, project sharing, and community building.",
content:
"Our monthly community meetup provides a relaxed environment to share your projects, get feedback, and connect with other developers interested in cooperative models.",
startDate: new Date("2024-11-09T18:00:00.000Z"),
endDate: new Date("2024-11-09T20:00:00.000Z"),
eventType: "community",
location: "#community-meetup",
isOnline: true,
membersOnly: false,
registrationRequired: false,
series: {
id: 'monthly-meetups',
title: 'Monthly Community Meetups',
description: 'Regular monthly gatherings for the cooperative game development community',
type: 'recurring_meetup',
id: "monthly-meetups",
title: "Monthly Community Meetups",
description:
"Regular monthly gatherings for the cooperative game development community",
type: "recurring_meetup",
position: 2,
totalEvents: 12,
isSeriesEvent: true
isSeriesEvent: true,
},
createdBy: 'admin'
}
]
createdBy: "admin",
},
];
// Insert all series events
const allSeriesEvents = [...workshopSeries, ...meetupSeries]
const allSeriesEvents = [...workshopSeries, ...meetupSeries];
for (const eventData of allSeriesEvents) {
const existingEvent = await Event.findOne({ slug: eventData.slug })
const existingEvent = await Event.findOne({ slug: eventData.slug });
if (!existingEvent) {
const event = new Event(eventData)
await event.save()
console.log(`Created series event: ${event.title}`)
const event = new Event(eventData);
await event.save();
console.log(`Created series event: ${event.title}`);
} else {
console.log(`Series event already exists: ${eventData.title}`)
console.log(`Series event already exists: ${eventData.title}`);
}
}
console.log('Series events seeding completed!')
process.exit(0)
console.log("Series events seeding completed!");
process.exit(0);
} catch (error) {
console.error('Error seeding series events:', error)
process.exit(1)
console.error("Error seeding series events:", error);
process.exit(1);
}
}
seedSeriesEvents()
seedSeriesEvents();