Selecting location

0
Hello , I want to build a bus reservation app so on first page i have to use location (ie From ,to or date of journey ).In  my project i have use Bus entity which contain From , To ,Date ,BusName,or seats. so when customer select the location by just selecting the location . i want to use a selector which just select (from attribute )seperatly and (To attribute) seperatly . I used reference selector on my page but on selecting from attribute it will by default select To and Date attribute . am I making mistake in entity or what  ?Please just help 
asked
2 answers
0

Hai Sakshi Mahalle,

it seems that you're trying to select the "From" and "To" attributes separately, but when you select the "From" attribute, it's also selecting the "To" and "Date" attributes by default. This could be due to the way your reference selector is set up, or there might be some confusion in your entity structure.

Let's break down the components of your app and create a basic domain model structure to help you better organize your data:

Create entity  

User:

  • Attributes: UserID, Username, Email, Password, FirstName, LastName, Phone, Address, etc.

Bus :

  • entity with the attributes (BusID, BusNumber, Capacity, Model, Type, etc....whichever you want)

location: 

  • entity with the attributes (RouteID, DepartureLocation, ArrivalLocation, Distance, Duration, etc...whichever you want) and 

Reservation:

  • Attributes: ReservationID, User (reference to User entity), Bus (reference to Bus entity), Route (reference to Route entity), DepartureDate, ReturnDate, SeatNumber, TotalPrice, Status, etc.

Associations:

  • User - Reservation:

    • One-to-Many: One user can have multiple reservations.
  • Bus - Reservation:

    • One-to-Many: One bus can have multiple reservations.
  • Location- Reservation:

    • One-to-Many: One route can have multiple reservations.
  • Bus - Location:

    • Many-to-Many: A bus can operate on multiple routes, and a route can be serviced by multiple buses.

 

answered
0

Thank for your Answer @Karthikeyan PM My domain model is given below ,can  you just elongate more 

answered