MongoSchemas - IEEE-Team-3/map GitHub Wiki

This file outlines all the MongoDB schemas used in the application. Each schema will be defined with TypeScript interfaces and Mongoose models.

User Schema

  • username: string
  • email: string
  • password: string (hashed)
  • globalRole: string
  • teams: TeamReference[]

Team Schema

  • name: string
  • owner: UserReference
  • members: MemberReference[]
  • parentTeam: TeamReference | null
  • subTeams: TeamReference[]
  • settings: TeamSettings

Role Schema

  • name: string
  • permissions: string[]
  • teamId: ObjectId

Task Schema

  • title: string
  • description: string
  • assignedTo: UserReference
  • points: number
  • bonusPoints: number
  • status: string
  • deadline: Date

Chat Schema

  • teamId: ObjectId
  • messages: Message[]
  • locked: boolean

Announcement Schema

  • teamId: ObjectId
  • title: string
  • content: string
  • author: UserReference
  • timestamp: Date

Leaderboard Schema

  • teamId: ObjectId
  • pointType: string
  • scores: { userId: ObjectId, points: number }[]
⚠️ **GitHub.com Fallback** ⚠️