You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every member currently pays individually. Companies and teams that want to book multiple seats under a single billing account — a standard enterprise coworking requirement — have no way to do so. A team accounts module enables B2B sales.
Context
User entity: backend/src/users/entities/user.entity.ts
Overview
Every member currently pays individually. Companies and teams that want to book multiple seats under a single billing account — a standard enterprise coworking requirement — have no way to do so. A team accounts module enables B2B sales.
Context
Userentity:backend/src/users/entities/user.entity.tsBookingentity:backend/src/bookings/entities/booking.entity.tsInvoicesModule:backend/src/invoices/— team invoices should be addressed to the team's billing emailEmailModule:backend/src/email/— for team invitationsTasks
Teamentity:id,name,ownerId(FK to User),seatLimit(int),billingEmail,isActive,createdAt,updatedAtTeamMemberentity:id,teamId,userId,role(OWNER/MEMBER),joinedAt; unique constraint on (teamId,userId)POST /teams— create a team (any authenticated user becomes owner)PATCH /teams/:id— update team name, seat limit, billing email (owner only)POST /teams/:id/invite— send invitation email to a user by email address (owner only)POST /teams/join/:inviteToken— accept invite, add to team asMEMBERDELETE /teams/:id/members/:userId— remove member from team (owner only, cannot remove self)GET /teams/me— get the team the current user belongs to (returnsnullif not in a team)GET /teams/:id— team details with member list (owner only)GET /teams/:id/invoices— consolidated invoice history for the team (owner only)Files to Modify / Create
backend/src/teams/(module, entities, controller, service, providers)backend/src/app.module.ts