Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
fix: Add email column to ProgramPerson
Browse files Browse the repository at this point in the history
  • Loading branch information
rossng committed Nov 10, 2020
1 parent 7c9e61b commit ae082cf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion db/schema-base/_SCHEMA.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{"_id":"PrivilegedConferenceDetails","objectId":"string","updatedAt":"date","createdAt":"date","_metadata":{"class_permissions":{"get":{"requiresAuthentication":true,"*":true},"find":{"requiresAuthentication":true,"*":true},"count":{},"create":{},"update":{"requiresAuthentication":true},"delete":{},"addField":{},"protectedFields":{}},"fields_options":{"conference":{"required":true},"key":{"required":true},"value":{"required":true}},"indexes":{"_id_":{"_id":{"$numberInt":"1"}}}},"conference":"*Conference","key":"string","value":"string"}
{"_id":"ProgramItem","objectId":"string","updatedAt":"date","createdAt":"date","_metadata":{"class_permissions":{"get":{"requiresAuthentication":true},"find":{"requiresAuthentication":true},"count":{},"create":{},"update":{},"delete":{},"addField":{},"protectedFields":{}},"fields_options":{"track":{"required":true},"conference":{"required":true},"abstract":{"required":true},"posterImage":{"required":false},"title":{"required":true},"feed":{"required":false},"exhibit":{"required":true,"defaultValue":false},"authors":{"required":false,"defaultValue":[]},"originatingID":{"required":false}},"indexes":{"_id_":{"_id":{"$numberInt":"1"}}}},"track":"*ProgramTrack","conference":"*Conference","abstract":"string","posterImage":"file","title":"string","feed":"*ContentFeed","exhibit":"boolean","authors":"array","originatingID":"string"}
{"_id":"ProgramItemAttachment","objectId":"string","updatedAt":"date","createdAt":"date","programItem":"*ProgramItem","_metadata":{"fields_options":{"programItem":{"required":true},"file":{"required":false},"attachmentType":{"required":true},"url":{"required":false},"conference":{"required":true}},"class_permissions":{"get":{"requiresAuthentication":true},"find":{"requiresAuthentication":true},"count":{},"create":{},"update":{"requiresAuthentication":true},"delete":{"requiresAuthentication":true},"addField":{},"protectedFields":{}},"indexes":{"_id_":{"_id":{"$numberInt":"1"}}}},"file":"file","attachmentType":"*AttachmentType","url":"string","conference":"*Conference"}
{"_id":"ProgramPerson","objectId":"string","updatedAt":"date","createdAt":"date","_metadata":{"class_permissions":{"get":{"requiresAuthentication":true},"find":{"requiresAuthentication":true},"count":{},"create":{},"update":{"requiresAuthentication":true},"delete":{},"addField":{},"protectedFields":{}},"fields_options":{"name":{"required":true},"profile":{"required":false},"conference":{"required":true},"affiliation":{"required":false,"defaultValue":""}},"indexes":{"_id_":{"_id":{"$numberInt":"1"}}}},"name":"string","profile":"*UserProfile","conference":"*Conference","affiliation":"string"}
{"_id":"ProgramPerson","objectId":"string","updatedAt":"date","createdAt":"date","_metadata":{"class_permissions":{"get":{"requiresAuthentication":true},"find":{"requiresAuthentication":true},"count":{},"create":{},"update":{"requiresAuthentication":true},"delete":{},"addField":{},"protectedFields":{}},"fields_options":{"name":{"required":true},"profile":{"required":false},"conference":{"required":true},"affiliation":{"required":false,"defaultValue":""},"email":{"required":false}},"indexes":{"_id_":{"_id":{"$numberInt":"1"}}}},"name":"string","profile":"*UserProfile","conference":"*Conference","affiliation":"string","email":"string"}
{"_id":"ProgramSession","objectId":"string","updatedAt":"date","createdAt":"date","_metadata":{"class_permissions":{"get":{"requiresAuthentication":true},"find":{"requiresAuthentication":true},"count":{},"create":{},"update":{},"delete":{},"addField":{},"protectedFields":{}},"fields_options":{"title":{"required":true},"track":{"required":true},"feed":{"required":true},"conference":{"required":true},"chair":{"required":false},"originatingID":{"required":false}},"indexes":{"_id_":{"_id":{"$numberInt":"1"}}}},"title":"string","track":"*ProgramTrack","feed":"*ContentFeed","conference":"*Conference","chair":"string","originatingID":"string"}
{"_id":"ProgramSessionEvent","objectId":"string","updatedAt":"date","createdAt":"date","_metadata":{"fields_options":{"conference":{"required":true},"startTime":{"required":true},"endTime":{"required":true},"directLink":{"required":false},"session":{"required":true},"item":{"required":true},"feed":{"required":false},"chair":{"required":false},"originatingID":{"required":false}},"class_permissions":{"get":{"requiresAuthentication":true},"find":{"requiresAuthentication":true},"count":{},"create":{},"update":{},"delete":{},"addField":{},"protectedFields":{}},"indexes":{"_id_":{"_id":{"$numberInt":"1"}}}},"conference":"*Conference","startTime":"date","endTime":"date","directLink":"string","session":"*ProgramSession","item":"*ProgramItem","feed":"*ContentFeed","chair":"string","originatingID":"string"}
{"_id":"ProgramTrack","objectId":"string","updatedAt":"date","createdAt":"date","_metadata":{"class_permissions":{"get":{"requiresAuthentication":true},"find":{"requiresAuthentication":true},"count":{},"create":{},"update":{},"delete":{},"addField":{},"protectedFields":{}},"fields_options":{"name":{"required":true},"conference":{"required":true},"shortName":{"required":true},"colour":{"required":true,"defaultValue":{"$numberInt":"0"}},"feed":{"required":false}},"indexes":{"_id_":{"_id":{"$numberInt":"1"}}}},"name":"string","conference":"*Conference","shortName":"string","colour":"string","feed":"*ContentFeed"}
Expand Down
8 changes: 8 additions & 0 deletions src/classes/DataLayer/Interface/ProgramPerson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ export default class Class extends CachedBase<K> implements SchemaT {
return this.data.affiliation;
}

get email(): string | undefined {
return this.data.email;
}

set email(value) {
this.data.email = value;
}

get items(): Promise<ProgramItem[]> {
return StaticBaseImpl.getAll<"ProgramItem", ProgramItem>("ProgramItem", this.conferenceId).then((xs) => {
return xs.filter((x) => x.authors.includes(this.id));
Expand Down
1 change: 1 addition & 0 deletions src/classes/DataLayer/Schema/ProgramPerson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Conference, UserProfile } from "../Interface";

export default interface Schema extends Base {
affiliation: string | undefined;
email: string | undefined;
name: string;

conference: Promise<Conference>;
Expand Down

0 comments on commit ae082cf

Please sign in to comment.