git commit -m "Updated schema and README file"

This commit is contained in:
Koushal Jain 2025-05-08 00:53:55 +05:30
parent 91b9831915
commit 7969fe6766
2 changed files with 23 additions and 0 deletions

View file

@ -163,3 +163,18 @@ For additional details, please refer to the blog post [Hello DCO, Goodbye CLA: S
## License
The Spring PetClinic sample application is released under version 2.0 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0).
## Assignment Enhancements
- Added endpoints to GET and POST pet attributes (Temperament, Length, Weight).
- Created REST API endpoints to **GET** and **POST** pet type data
- Developed model, service, repository, and controller layers
- Included SQL schema for new table
## Endpoints
- `POST /api/pettypes` — Create a new pet with attributes
- `GET /api/pettypes` — Retrieve all pet types with their attributes
Access the endpoints via Postman or curl at:
http://localhost:8080/api/pettypes

View file

@ -62,3 +62,11 @@ CREATE TABLE visits (
);
ALTER TABLE visits ADD CONSTRAINT fk_visits_pets FOREIGN KEY (pet_id) REFERENCES pets (id);
CREATE INDEX visits_pet_id ON visits (pet_id);
CREATE TABLE pet_types (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
temperament VARCHAR(255),
length DOUBLE,
weight DOUBLE
);