mirror of
https://github.com/mudabbir-ahmad/MAD-Treasure-Hunt.git
synced 2026-10-08 03:00:20 +00:00
33 lines
974 B
JavaScript
33 lines
974 B
JavaScript
class GroupModel {
|
|
constructor(payload) {
|
|
this.Gid = payload.Gid;
|
|
this.GroupName = payload.GroupName;
|
|
this.BusinessOrSchoolName = payload.BusinessOrSchoolName;
|
|
this.GameType = payload.GameType;
|
|
this.AdminJoinCode = payload.AdminJoinCode;
|
|
this.CreatedByUid = payload.CreatedByUid;
|
|
this.MaxMemberSubgroups = payload.MaxMemberSubgroups;
|
|
this.TeamsEnabled = Boolean(payload.TeamsEnabled);
|
|
this.ApprovedAdmins = payload.ApprovedAdmins || [];
|
|
this.CreatedAt = payload.CreatedAt;
|
|
}
|
|
|
|
toJSON() {
|
|
return {
|
|
Gid: this.Gid,
|
|
GroupName: this.GroupName,
|
|
BusinessOrSchoolName: this.BusinessOrSchoolName,
|
|
GameType: this.GameType,
|
|
AdminJoinCode: this.AdminJoinCode,
|
|
CreatedByUid: this.CreatedByUid,
|
|
MaxMemberSubgroups: this.MaxMemberSubgroups,
|
|
TeamsEnabled: this.TeamsEnabled,
|
|
ApprovedAdmins: this.ApprovedAdmins,
|
|
CreatedAt: this.CreatedAt,
|
|
};
|
|
}
|
|
}
|
|
|
|
export default GroupModel;
|
|
|