Move software files one directory up, Readme
This commit is contained in:
14
src/data/models/acts/bandApiModel.ts
Normal file
14
src/data/models/acts/bandApiModel.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { BandModel } from "./bandModel";
|
||||
import { ConcertModel } from "./concertModel";
|
||||
import { GenreModel } from "./genreModel"
|
||||
import { MemberModel } from "./memberModel";
|
||||
|
||||
/**
|
||||
* Replica of the API endpoint /bands
|
||||
*/
|
||||
export class BandApiModel extends BandModel {
|
||||
members: Array<MemberModel>
|
||||
genres: Array<GenreModel> = []
|
||||
rating: number = 0
|
||||
concerts: Array<ConcertModel> = []
|
||||
}
|
||||
15
src/data/models/acts/bandDetailsApiModel.ts
Normal file
15
src/data/models/acts/bandDetailsApiModel.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { BandModel } from "./bandModel";
|
||||
import { ConcertApiModel } from "./concertApiModel";
|
||||
import { GenreModel } from "./genreModel"
|
||||
import { MemberModel } from "./memberModel";
|
||||
import { RatingModel } from "./ratingModel"
|
||||
|
||||
/**
|
||||
* Replica of the API endpoint /bands/band/:name
|
||||
*/
|
||||
export class BandDetailsApiModel extends BandModel {
|
||||
members: Array<MemberModel> = []
|
||||
ratingValues: Array<RatingModel> = []
|
||||
genres: Array<GenreModel> = []
|
||||
concerts: Array<ConcertApiModel> = []
|
||||
}
|
||||
11
src/data/models/acts/bandModel.ts
Normal file
11
src/data/models/acts/bandModel.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export class BandModel {
|
||||
id: number
|
||||
name: string = ""
|
||||
foundingYear: number = 1900
|
||||
descriptionEn: string = ""
|
||||
descriptionDe: string = ""
|
||||
images: Array<string> = []
|
||||
imageMembers: string = ""
|
||||
logo: string = ""
|
||||
rating: number = 0
|
||||
}
|
||||
8
src/data/models/acts/concertApiModel.ts
Normal file
8
src/data/models/acts/concertApiModel.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { LocationApiModel } from "../locations/locationApiModel"
|
||||
import { BandModel } from "./bandModel"
|
||||
import { ConcertModel } from "./concertModel"
|
||||
|
||||
export class ConcertApiModel extends ConcertModel {
|
||||
location: LocationApiModel = new LocationApiModel()
|
||||
band: BandModel = new BandModel()
|
||||
}
|
||||
8
src/data/models/acts/concertDetailsApiModel.ts
Normal file
8
src/data/models/acts/concertDetailsApiModel.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { LocationDetailsApiModel } from "../locations/locationDetailsApiModel";
|
||||
import { BandModel } from "./bandModel";
|
||||
import { ConcertModel } from "./concertModel";
|
||||
|
||||
export class ConcertDetailsApiModel extends ConcertModel {
|
||||
location: LocationDetailsApiModel = new LocationDetailsApiModel()
|
||||
band: BandModel = new BandModel()
|
||||
}
|
||||
9
src/data/models/acts/concertModel.ts
Normal file
9
src/data/models/acts/concertModel.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class ConcertModel {
|
||||
id: number = -1
|
||||
date: string = ""
|
||||
name: string = ""
|
||||
price: number = 0
|
||||
image: string = ""
|
||||
inStock: number = 0
|
||||
offered: boolean = true
|
||||
}
|
||||
6
src/data/models/acts/genreApiModel.ts
Normal file
6
src/data/models/acts/genreApiModel.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { GenreModel } from "./genreModel";
|
||||
import { BandModel } from "./bandModel"
|
||||
|
||||
export class GenreApiModel extends GenreModel {
|
||||
bands: Array<BandModel>
|
||||
}
|
||||
4
src/data/models/acts/genreModel.ts
Normal file
4
src/data/models/acts/genreModel.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export class GenreModel {
|
||||
id: number
|
||||
name: string = ""
|
||||
}
|
||||
4
src/data/models/acts/memberModel.ts
Normal file
4
src/data/models/acts/memberModel.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export class MemberModel {
|
||||
name: string = ""
|
||||
image: string = ""
|
||||
}
|
||||
4
src/data/models/acts/ratingModel.ts
Normal file
4
src/data/models/acts/ratingModel.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export class RatingModel {
|
||||
value: number = 0
|
||||
count: number = 0
|
||||
}
|
||||
32
src/data/models/apiEndpoints/orderApiModel.ts
Normal file
32
src/data/models/apiEndpoints/orderApiModel.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { AccountModel } from "../user/accountModel"
|
||||
import { AddressModel } from "../user/addressModel"
|
||||
import { PaymentModel } from "../user/paymentModel"
|
||||
import { OrderModel } from "../ordering/orderModel"
|
||||
import { TicketModel } from "../ordering/ticketModel"
|
||||
import { ConcertApiModel } from "../acts/concertApiModel"
|
||||
import { SeatModel } from "../locations/seatModel"
|
||||
import { SeatRowModel } from "../locations/seatRowModel"
|
||||
import { SeatGroupModel } from "../locations/seatGroupModel"
|
||||
|
||||
/**
|
||||
* Replica of API endpoint /orders/:id
|
||||
*/
|
||||
export class OrderApiModel extends OrderModel {
|
||||
tickets: Array<TicketOrderModel>
|
||||
account: AccountModel
|
||||
payment: PaymentModel
|
||||
address: AddressModel
|
||||
}
|
||||
|
||||
class TicketOrderModel extends TicketModel {
|
||||
concert: ConcertApiModel
|
||||
seat: SeatTicketModel
|
||||
}
|
||||
|
||||
class SeatTicketModel extends SeatModel {
|
||||
seatRow: SeatRowTicketModel
|
||||
}
|
||||
|
||||
class SeatRowTicketModel extends SeatRowModel {
|
||||
seatGroup: SeatGroupModel
|
||||
}
|
||||
8
src/data/models/exercises/exerciseGroupModel.ts
Normal file
8
src/data/models/exercises/exerciseGroupModel.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export class ExerciseGroupModel {
|
||||
id = -1
|
||||
nameDe: string = ""
|
||||
nameEn: string = ""
|
||||
groupNr: number = 0
|
||||
descriptionDe: string = ""
|
||||
descriptionEn: string = ""
|
||||
}
|
||||
12
src/data/models/exercises/exerciseModel.ts
Normal file
12
src/data/models/exercises/exerciseModel.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { ExerciseGroupModel } from "./exerciseGroupModel"
|
||||
|
||||
export class ExerciseModel {
|
||||
id = -1
|
||||
nameDe: string = ""
|
||||
nameEn: string = ""
|
||||
exerciseNr: number = 0
|
||||
descriptionDe: string = ""
|
||||
descriptionEn: string = ""
|
||||
solved: boolean = false
|
||||
exerciseGroup: ExerciseGroupModel
|
||||
}
|
||||
12
src/data/models/locations/cityApiModel.ts
Normal file
12
src/data/models/locations/cityApiModel.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { LocationApiModel } from "./locationApiModel"
|
||||
|
||||
/**
|
||||
* Replica of the API endpoint /cities
|
||||
*/
|
||||
export class CityApiModel {
|
||||
id: number = -1
|
||||
name: string = ""
|
||||
country: string = ""
|
||||
image: string = ""
|
||||
locations: Array<LocationApiModel>
|
||||
}
|
||||
6
src/data/models/locations/cityModel.ts
Normal file
6
src/data/models/locations/cityModel.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class CityModel {
|
||||
id: number = -1
|
||||
name: string = ""
|
||||
country: string = ""
|
||||
image: string = ""
|
||||
}
|
||||
10
src/data/models/locations/locationApiModel.ts
Normal file
10
src/data/models/locations/locationApiModel.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { CityModel } from "./cityModel"
|
||||
import { LocationModel } from "./locationModel"
|
||||
|
||||
/**
|
||||
* Replica of the API endpoint /locations
|
||||
*/
|
||||
export class LocationApiModel extends LocationModel {
|
||||
city: CityModel = new CityModel()
|
||||
nrOfConcerts: number = 0
|
||||
}
|
||||
13
src/data/models/locations/locationDetailsApiModel.ts
Normal file
13
src/data/models/locations/locationDetailsApiModel.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { ConcertApiModel } from "../acts/concertApiModel"
|
||||
import { CityModel } from "./cityModel"
|
||||
import { LocationModel } from "./locationModel"
|
||||
import { SeatGroupModel } from "./seatGroupModel"
|
||||
|
||||
/**
|
||||
* Replica of the API endpoint /locations/location/:name
|
||||
*/
|
||||
export class LocationDetailsApiModel extends LocationModel {
|
||||
city: CityModel = new CityModel()
|
||||
concerts: Array<ConcertApiModel> = []
|
||||
seatGroups: Array<SeatGroupModel> = []
|
||||
}
|
||||
10
src/data/models/locations/locationModel.ts
Normal file
10
src/data/models/locations/locationModel.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export class LocationModel {
|
||||
id: number = -1
|
||||
name: string = ""
|
||||
address: string = ""
|
||||
imageIndoor: string = ""
|
||||
imageOutdoor: string = ""
|
||||
capacity: number = 0
|
||||
layout: number = 1
|
||||
urlName: string = ""
|
||||
}
|
||||
10
src/data/models/locations/seatGroupModel.ts
Normal file
10
src/data/models/locations/seatGroupModel.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { SeatRowModel } from "./seatRowModel"
|
||||
|
||||
export class SeatGroupModel {
|
||||
name: string = ""
|
||||
surcharge: number = 0
|
||||
standingArea: boolean = false
|
||||
capacity: number = 0
|
||||
occupied: number = 0
|
||||
seatRows: Array<SeatRowModel>
|
||||
}
|
||||
5
src/data/models/locations/seatModel.ts
Normal file
5
src/data/models/locations/seatModel.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export class SeatModel {
|
||||
id: number = -1
|
||||
seatNr: number = 0
|
||||
state: number = 0
|
||||
}
|
||||
6
src/data/models/locations/seatRowModel.ts
Normal file
6
src/data/models/locations/seatRowModel.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { SeatModel } from "./seatModel"
|
||||
|
||||
export class SeatRowModel {
|
||||
row: number = 0
|
||||
seats: Array<SeatModel>
|
||||
}
|
||||
17
src/data/models/ordering/basketItemModel.ts
Normal file
17
src/data/models/ordering/basketItemModel.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { BandModel } from "../acts/bandModel"
|
||||
import { ConcertModel } from "../acts/concertModel"
|
||||
import { SeatModel } from "../locations/seatModel"
|
||||
|
||||
export class BasketItemModel {
|
||||
concert: ConcertModel
|
||||
band: BandModel = new BandModel()
|
||||
seats: Array<SeatModel> = []
|
||||
price: number
|
||||
|
||||
constructor(concert: ConcertModel, band: BandModel, seat: SeatModel, price: number) {
|
||||
this.concert = concert
|
||||
this.band = band
|
||||
this.seats = [ seat ]
|
||||
this.price = price
|
||||
}
|
||||
}
|
||||
5
src/data/models/ordering/orderModel.ts
Normal file
5
src/data/models/ordering/orderModel.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export class OrderModel {
|
||||
id: number
|
||||
orderedAt: string
|
||||
shipped: boolean
|
||||
}
|
||||
17
src/data/models/ordering/selectedSeatModel.ts
Normal file
17
src/data/models/ordering/selectedSeatModel.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { ConcertModel } from "../acts/concertModel";
|
||||
import { SeatModel } from "../locations/seatModel";
|
||||
|
||||
export class SelectedSeatModel {
|
||||
seat: SeatModel
|
||||
seatRow: number
|
||||
seatGroupName: string
|
||||
concert: ConcertModel
|
||||
price: number
|
||||
|
||||
constructor(seat: SeatModel, seatRow: number, seatGroupName: string, concert: ConcertModel) {
|
||||
this.seat = seat
|
||||
this.seatRow = seatRow
|
||||
this.seatGroupName = seatGroupName
|
||||
this.concert = concert
|
||||
}
|
||||
}
|
||||
8
src/data/models/ordering/ticketApiModel.ts
Normal file
8
src/data/models/ordering/ticketApiModel.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ConcertApiModel } from "../acts/concertApiModel";
|
||||
import { SeatModel } from "../locations/seatModel";
|
||||
import { TicketModel } from "./ticketModel";
|
||||
|
||||
export class TicketApiModel extends TicketModel {
|
||||
concert: ConcertApiModel
|
||||
seat: SeatModel
|
||||
}
|
||||
6
src/data/models/ordering/ticketModel.ts
Normal file
6
src/data/models/ordering/ticketModel.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class TicketModel {
|
||||
id: number
|
||||
orderId: number = -1
|
||||
orderPrice: number = 0
|
||||
concertId: number = 0
|
||||
}
|
||||
10
src/data/models/user/accountApiModel.ts
Normal file
10
src/data/models/user/accountApiModel.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { AccountModel } from "./accountModel"
|
||||
import { AccountRole } from "./accountRole"
|
||||
import { AddressModel } from "./addressModel"
|
||||
import { PaymentModel } from "./paymentModel"
|
||||
|
||||
export class AccountApiModel extends AccountModel {
|
||||
addresses: Array<AddressModel>
|
||||
payments: Array<PaymentModel>
|
||||
accountRole: AccountRole = new AccountRole()
|
||||
}
|
||||
8
src/data/models/user/accountModel.ts
Normal file
8
src/data/models/user/accountModel.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export class AccountModel {
|
||||
id: number
|
||||
username: string = ""
|
||||
password: string = ""
|
||||
email: string = ""
|
||||
firstName: string = ""
|
||||
lastName: string = ""
|
||||
}
|
||||
5
src/data/models/user/accountRole.ts
Normal file
5
src/data/models/user/accountRole.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export class AccountRole {
|
||||
name: string = ""
|
||||
privilegeBuy: boolean = false
|
||||
privilegeAdminPanel: boolean = false
|
||||
}
|
||||
6
src/data/models/user/addressModel.ts
Normal file
6
src/data/models/user/addressModel.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class AddressModel {
|
||||
street: string = ""
|
||||
houseNumber: number
|
||||
postalCode: number
|
||||
city: string = ""
|
||||
}
|
||||
4
src/data/models/user/paymentModel.ts
Normal file
4
src/data/models/user/paymentModel.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export class PaymentModel {
|
||||
bankName: string = ""
|
||||
iban: string = ""
|
||||
}
|
||||
Reference in New Issue
Block a user