React frontend for Agorata
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
export class Zone {
|
|
|
|
zone: string; // Without the dot in the front
|
|
|
|
min_length: number;
|
|
|
|
length_1: number;
|
|
|
|
length_2: number;
|
|
|
|
price_buy_1?: number;
|
|
|
|
price_buy_2?: number;
|
|
|
|
price_auction_1?: number;
|
|
|
|
price_auction_2?: number;
|
|
|
|
|
|
|
|
constructor(zone: string,
|
|
|
|
price_buy_1?: number, price_buy_2?: number, price_auction_1?: number, price_auction_2?: number,
|
|
|
|
min_length: number = 2, length_1: number = 3, length_2: number = 8
|
|
|
|
) {
|
|
|
|
this.zone = zone;
|
|
|
|
this.min_length = min_length;
|
|
|
|
this.length_1 = length_1;
|
|
|
|
this.length_2 = length_2;
|
|
|
|
this.price_buy_1 = price_buy_1;
|
|
|
|
this.price_buy_2 = price_buy_2;
|
|
|
|
this.price_auction_1 = price_auction_1;
|
|
|
|
this.price_auction_2 = price_auction_2;
|
|
|
|
}
|
|
|
|
|
|
|
|
canBuy(): boolean {
|
|
|
|
return this.price_buy_1 !== undefined && this.price_buy_1 !== null;
|
|
|
|
}
|
|
|
|
|
|
|
|
canAuction(): boolean {
|
|
|
|
return this.price_auction_1 !== undefined && this.price_auction_1 !== null;
|
|
|
|
}
|
|
|
|
}
|