mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
refactor: moved default price into SCPriceGroup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user