feat: add core

This commit is contained in:
Karl-Philipp Wulfert
2018-11-29 16:22:57 +01:00
commit 2d770dde44
131 changed files with 41268 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
/*
* Copyright (C) 2018 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SCThing, SCThingMeta} from '../Thing';
import {SCISO8601Date} from '../types/Time';
import {SCAcademicEventWithoutReferences} from './AcademicEvent';
import {SCArticleWithoutReferences} from './Article';
import {SCBookWithoutReferences} from './Book';
import {SCBuildingWithoutReferences} from './Building';
import {SCPersonWithoutReferences} from './Person';
import {SCPointOfInterestWithoutReferences} from './PointOfInterest';
import {SCRoomWithoutReferences} from './Room';
import {SCSportCourseWithoutReferences} from './SportCourse';
/**
* Type of a favorite
*/
export type SCFavoriteType = 'favorite';
/**
* A favorite without references
*/
export interface SCFavoriteWithoutReferences extends SCThing {
/**
* When the favorite was last changed.
*/
changed: SCISO8601Date;
/**
* When the favorite was created.
*/
created: SCISO8601Date;
/**
* If it is deleted or not, defaults to false.
*/
deleted?: boolean;
/**
* Type of a favorite
*/
type: SCFavoriteType;
}
/**
* A favorite
*/
export interface SCFavorite extends SCFavoriteWithoutReferences {
/**
* The contained thing.
*/
data:
SCAcademicEventWithoutReferences
| SCArticleWithoutReferences
| SCBookWithoutReferences
| SCBuildingWithoutReferences
| SCPersonWithoutReferences
| SCPointOfInterestWithoutReferences
| SCRoomWithoutReferences
| SCSportCourseWithoutReferences;
}
/**
* Meta information about a favorite
*/
export class SCFavoriteMeta extends SCThingMeta {
}