Verified Commit 85c8fc49 authored by Rainer Killinger's avatar Rainer Killinger
Browse files

feat: add base scheme for academic degrees

parent 100d1781
Loading
Loading
Loading
Loading
+80 −0
Original line number Diff line number Diff line
/*
 * 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} from '../Thing';
import {SCThingMeta} from '../Thing';

/**
 * An academic degree without references
 */
export interface SCAcademicDegreeWithoutReferences extends SCThing {
  /**
   * The achievable academic degree
   */
  academicDegree: SCGermanAcademicDegree;

  /**
   * The achievable academic degree with academic field specification 
   * (eg. Master of Science)
   */
  academicDegreewithField: string;

  /**
   * The achievable academic degree with academic field specification 
   * shorted (eg. M.Sc.).
   */
  academicDegreewithFieldShort: string;
}

export interface SCAcademicDegree extends SCAcademicDegreeWithoutReferences {
}

export class SCAcademicDegreeMeta extends SCThingMeta {
  static fieldTranslations = {
    ...SCThingMeta.fieldTranslations,
    de: {
      academicDegree: 'Hochschulgrad',
      academicDegreewithField: 'Abschlussbezeichnungen',
      academicDegreewithFieldShort: 'Abschlussbezeichnungen (kurz)',
    },
  };

  static fieldValueTranslations = {
    ...SCThingMeta.fieldValueTranslations,
    de: {
      academicDegree: {
        'bachelor': 'Bachelor',
        'diploma': 'Diplom',
        'doctor': 'Doktor',
        'licentiate': 'Lizenziat',
        'magister': 'Magister',
        'master': 'Master',
        'masterstudent': 'Meisterschüler',
        'state examination': 'Staatsexamen',
      },
    },
  };
}

/**
 * Types of (german) academic degrees
 */
export type SCGermanAcademicDegree = 'bachelor' |
                                     'diploma' |
                                     'doctor' |
                                     'licentiate' |
                                     'magister' |
                                     'master' |
                                     'master pupil' |
                                     'state examination' ;