the backend code for a Fitness Management System developed using Spring Boot and Hibernate. The system allows for managing locations, users, trainers, and nutritionists.
Entity Structure:Trainer:
Represents a fitness trainer associated with a gym.
Attributes:
id: Unique identifier for the trainer.
firstName: First name of the trainer.
lastName: Last name of the trainer.
age: Age of the trainer.
weight: Weight of the trainer.
email: Email address of the trainer.
password: Password for the trainer's account.
Relationships:
One-to-Many relationship with User entities, mapped by trainer.
Many-to-One relationship with GymOwner entity, mapped by gym_owner_id.
User:
Represents a user associated with a trainer.
Attributes:
Add your user attributes here...
GymOwner:
Represents a gym owner associated with a trainer.
Attributes:
Add your gym owner attributes here...
APIs:
GET /api/trainers: Get all trainers.
GET /api/trainers/{id}: Get trainer by ID.
POST /api/trainers: Create a new trainer.
PUT /api/trainers/{id}: Update an existing trainer.
DELETE /api/trainers/{id}: Delete a trainer by ID.
the backend code for a Fitness Management System developed using Spring Boot and Hibernate. The system allows for managing locations, users, trainers, and nutritionists.
Entity Structure: Trainer:
Represents a fitness trainer associated with a gym.
Attributes: id: Unique identifier for the trainer. firstName: First name of the trainer. lastName: Last name of the trainer. age: Age of the trainer. weight: Weight of the trainer. email: Email address of the trainer. password: Password for the trainer's account.
Relationships: One-to-Many relationship with User entities, mapped by trainer. Many-to-One relationship with GymOwner entity, mapped by gym_owner_id. User:
Represents a user associated with a trainer.
Attributes: Add your user attributes here... GymOwner:
Represents a gym owner associated with a trainer.
Attributes:
Add your gym owner attributes here... APIs: GET /api/trainers: Get all trainers. GET /api/trainers/{id}: Get trainer by ID. POST /api/trainers: Create a new trainer. PUT /api/trainers/{id}: Update an existing trainer. DELETE /api/trainers/{id}: Delete a trainer by ID.