Skip to content
Snippets Groups Projects
Select Git revision
  • 683ce4f3bc4fffb7ed626402387a605352400936
  • master default
  • goodpaths
  • movie-page
  • front-bilel
  • vieille-branche
  • octofront
  • branche-TP-de-Tom
8 results

users.js

Blame
  • models.ts 2.08 KiB
    import { Address, UserInfo } from 'app/core';
    
    
    export interface Place {
      id: number;
      name: string;
      address: Address;
      description: string;
    }
    
    export interface Participant {
      id: number;
      present?: boolean;
      accepted?: boolean;
      user: UserInfo;
      visitId?: number;
    }
    
    export interface Organizer {
      id: number;
      user: UserInfo;
    }
    
    export class Visit {
      id: number;
      title: string;
      summary: string;
      description: string;
      place: Place;
      date: Date;
      startTime: Date;
      endTime: Date;
      meetingPlace: string;
      passed: boolean;
      deadline: Date;
      registrationsOpen: boolean;
      image: string;
      factSheet: string;
      contextSheet: string;
      permissionSheet: string;
      participants: Participant[];
      organizers: Organizer[];
    
      constructor(opts: {
        id: number,
        title: string,
        summary: string;
        description?: string,
        place: Place,
        date: Date,
        startTime: Date,
        endTime: Date,
        passed: boolean,
        meetingPlace?: string;
        deadline: Date,
        registrationsOpen: boolean,
        image: string;
        factSheet?: string;
        contextSheet?: string;
        permissionSheet?: string;
        participants?: Participant[];
        organizers?: Organizer[],
      }) {
        this.id = opts.id;
        this.title = opts.title || null;
        this.summary = opts.summary || null;
        this.description = opts.description || null;
        this.place = opts.place;
        this.date = opts.date;
        this.startTime = opts.startTime;