Skip to content

Commit

Permalink
adding booking component and api
Browse files Browse the repository at this point in the history
  • Loading branch information
yelmorabit committed Jul 26, 2020
1 parent 624be0c commit 5984bcb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .jhipster/Seat.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"fieldName": "status",
"fieldType": "SeatStatus",
"fieldValues": "BOOKED (Booked),AVAILABLE (Available)"
"fieldValues": "BOOKED (Booked),AVAILABLE (Available),UNSET (Unset)"
},
{
"fieldName": "aisleSeat",
Expand Down
11 changes: 3 additions & 8 deletions jhipster-jdl.jh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ entity Seat {
status SeatStatus,
aisleSeat Boolean,
windowSeat Boolean,
middleSeat Boolean,
tempAttribute String
middleSeat Boolean
}

entity Reservation {
Expand All @@ -24,17 +23,13 @@ entity Reservation {
}

enum SeatStatus {
BOOKED("Booked"), AVAILABLE("Available")
}

entity TempUser{
login String
BOOKED("Booked"), AVAILABLE("Available"), UNSET("Unset")
}


// defining multiple OneToMany relationships with comments
relationship OneToMany {
Team{members(login)} to TempUser,
Team{members(login)} to User,
Seat{reservation} to Reservation{seat(number)},
/**
* A relationship
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
*/
public enum SeatStatus {
BOOKED("Booked"),
AVAILABLE("Available");
AVAILABLE("Available"),
UNSET("Unset");

private final String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ <h2 id="jhi-seat-heading">Create or edit a Seat</h2>
<select class="form-control" name="status" formControlName="status" id="field_status">
<option value="BOOKED">Booked</option>
<option value="AVAILABLE">Available</option>
<option value="UNSET">Unset</option>
</select>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ export const enum SeatStatus {
BOOKED = 'Booked',

AVAILABLE = 'Available',

UNSET = 'Unset',
}

0 comments on commit 5984bcb

Please sign in to comment.