[Gekidou] Update database to hold if a user is a team or channel admin (#6351)

* Update database to hold if a user is a team or channel admin

* TeamMembership identifier

* Fix handleTeamMembership test

* Update server.md

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
This commit is contained in:
Elias Nahum
2022-06-06 05:54:02 -04:00
committed by GitHub
parent f97d943f9a
commit 81357d8a0e
14 changed files with 36 additions and 3 deletions

View File

@@ -37,6 +37,9 @@ export default class ChannelMembershipModel extends Model implements ChannelMemb
/* user_id: The foreign key to the related User record*/
@field('user_id') userId!: string;
/* scheme_admin: Determines if the user is an admin of the channel*/
@field('scheme_admin') schemeAdmin!: boolean;
/** memberChannel : The related channel this member belongs to */
@immutableRelation(CHANNEL, 'channel_id') memberChannel!: Relation<ChannelModel>;

View File

@@ -37,6 +37,9 @@ export default class TeamMembershipModel extends Model implements TeamMembership
/* user_id: The foreign key to the related User record*/
@field('user_id') userId!: string;
/* scheme_admin: Determines if the user is an admin of the team*/
@field('scheme_admin') schemeAdmin!: boolean;
/** memberUser: The related user in the team */
@immutableRelation(USER, 'user_id') memberUser!: Relation<UserModel>;