Move software files one directory up, Readme

This commit is contained in:
2024-11-19 16:51:28 +01:00
parent baf763c4cb
commit 1dc5740f03
329 changed files with 255 additions and 31 deletions

View 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> = []
}

View 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> = []
}

View 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
}

View 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()
}

View 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()
}

View 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
}

View File

@@ -0,0 +1,6 @@
import { GenreModel } from "./genreModel";
import { BandModel } from "./bandModel"
export class GenreApiModel extends GenreModel {
bands: Array<BandModel>
}

View File

@@ -0,0 +1,4 @@
export class GenreModel {
id: number
name: string = ""
}

View File

@@ -0,0 +1,4 @@
export class MemberModel {
name: string = ""
image: string = ""
}

View File

@@ -0,0 +1,4 @@
export class RatingModel {
value: number = 0
count: number = 0
}

View 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
}

View File

@@ -0,0 +1,8 @@
export class ExerciseGroupModel {
id = -1
nameDe: string = ""
nameEn: string = ""
groupNr: number = 0
descriptionDe: string = ""
descriptionEn: string = ""
}

View 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
}

View 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>
}

View File

@@ -0,0 +1,6 @@
export class CityModel {
id: number = -1
name: string = ""
country: string = ""
image: string = ""
}

View 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
}

View 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> = []
}

View 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 = ""
}

View 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>
}

View File

@@ -0,0 +1,5 @@
export class SeatModel {
id: number = -1
seatNr: number = 0
state: number = 0
}

View File

@@ -0,0 +1,6 @@
import { SeatModel } from "./seatModel"
export class SeatRowModel {
row: number = 0
seats: Array<SeatModel>
}

View 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
}
}

View File

@@ -0,0 +1,5 @@
export class OrderModel {
id: number
orderedAt: string
shipped: boolean
}

View 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
}
}

View 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
}

View File

@@ -0,0 +1,6 @@
export class TicketModel {
id: number
orderId: number = -1
orderPrice: number = 0
concertId: number = 0
}

View 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()
}

View File

@@ -0,0 +1,8 @@
export class AccountModel {
id: number
username: string = ""
password: string = ""
email: string = ""
firstName: string = ""
lastName: string = ""
}

View File

@@ -0,0 +1,5 @@
export class AccountRole {
name: string = ""
privilegeBuy: boolean = false
privilegeAdminPanel: boolean = false
}

View File

@@ -0,0 +1,6 @@
export class AddressModel {
street: string = ""
houseNumber: number
postalCode: number
city: string = ""
}

View File

@@ -0,0 +1,4 @@
export class PaymentModel {
bankName: string = ""
iban: string = ""
}