/** * An interface which defines which attributes all other object interfaces should have. */ interface ObjectBase { _id: any last_changed : Date } /** * An interface which defines which attributes a poll should have. */ export interface Poll extends ObjectBase { creator: Participant title: string start_date_poll: Date end_date_poll: Date displayed_dates: Date[] exposing: boolean location: string timeslot_min_duration: number hash: string cal_start: Date cal_end: Date cal_timesteps: number theme: string color_nav: string color_content: string color_buttons: string logo: string timeslots: Timeslot[] participants: Participant[] } /** * An interface which defines which attributes a timeslot should have. */ export interface Timeslot extends ObjectBase { start_date: Date end_date: Date } /** * An interface which defines which attributes a comment should have. */ export interface Comment extends ObjectBase { text: string date_created: Date } /** * An interface which defines which attributes a participant should have. */ export interface Participant extends ObjectBase { user_id?: any name: string comments: Comment[] timeslots: Timeslot[] } /** * An interface which defines which attributes an user should have. */ export interface User extends ObjectBase { username : string name : string surname : string email : string hash? : string firebase_id?:any company : string birthdate : Date gender : string school : string country : string profile_image : string last_login: Date } /** * An interface which defines which attributes a token should have. */ export interface Token extends ObjectBase { user_id : any }