refactor: moved default price into SCPriceGroup

This commit is contained in:
Michel Jonathan Schmitz
2019-02-27 13:59:14 +01:00
parent 86d9696f58
commit 797e5ca9de
6 changed files with 90 additions and 14 deletions

View File

@@ -20,10 +20,13 @@ import {SCISO8601Date} from '../types/Time';
import {SCInPlace} from './../types/Places';
/**
* A map from group name to price
* Default price without distinction
*/
export interface SCPriceGroup {
[s: string]: number | undefined;
/**
* Default price of the thing
*/
default: number;
}
/**
@@ -82,15 +85,10 @@ export interface SCThingThatCanBeOfferedOffer<T extends SCPriceGroup>
*/
availabilityStarts?: SCISO8601Date;
/**
* Default price of the thing
*/
price: number;
/**
* List of prices that are distinct for specific groups
*/
prices?: T;
prices: T;
/**
* Provider of an offer

View File

@@ -32,7 +32,7 @@ export interface SCSportCoursePriceGroup extends SCAcademicPriceGroup {
/**
* Price for alumnis
*/
alumni: number;
alumni?: number;
}
/**