Skip to content

Boryszs/Car-Rent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car-Rental

Instrukcja Uruchomienia Projektu:
Instrukcja Uruchomienia Testów:
  • mvn dependency:resolve
  • mvn install
  • mvn test
Instrukcja Uruchomienia Projektu:
  • mvn dependency:resolve
  • mvn install
  • mvn spring-boot:run
Język Programowania:
  • Java wersja 15.
Użyte technologie:
  • Spring Boot
  • Spring Security
  • Hibernate JPA
  • Spring Data
  • Javax Mail
  • Hibernate
  • JSON Web Token
  • itext
Dokumentacja Servera:

Dokumentacja Servera

Dokumentacja API:

user-controller
POST 
​/user​/edit  
{
"id": 0,
"username": "string",
"email": "string",
"role": [
"string"
],
"password": "string"
}
GET 
​/user​/get?id = id
DELETE 
​/user​/delete?id = id
reservation-controller
DELETE
​/reservation​/delete?id = id
POST
​/reservation​/add
{
  "id_user": 0,
  "id_car": 0,
  "dateto": "string",
  "datefrom": "string",
  "localization_end": "string",
  "localization_start": "string"
}
POST
​/reservation​/add-pdf
{
  "id_user": 0,
  "id_car": 0,
  "dateto": "string",
  "datefrom": "string",
  "localization_end": "string",
  "localization_start": "string"
}
Response : Resume order pdf.
GET
​/reservation​/show
[
  {
    "idrent": 0,
    "car": {
      "idcar": 0,
      "mark": "string",
      "model": "string",
      "type": "string",
      "yearProduction": 0,
      "color": "string",
      "engineCapacity": 0,
      "money": 0,
      "image": "string",
      "localization": {
        "id": 0,
        "city": "string"
      }
    },
    "dataFrom": "2020-12-30T02:34:34.327Z",
    "dataTo": "2020-12-30T02:34:34.327Z",
    "localizationStart": {
      "id": 0,
      "city": "string"
    },
    "localizationEnd": {
      "id": 0,
      "city": "string"
    },
    "price": 0
  }
]
GET
​/reservation​/get?id = id  
[
  {
    "idrent": 0,
    "car": {
      "idcar": 0,
      "mark": "string",
      "model": "string",
      "type": "string",
      "yearProduction": 0,
      "color": "string",
      "engineCapacity": 0,
      "money": 0,
      "image": "string",
      "localization": {
        "id": 0,
        "city": "string"
      }
    },
    "dataFrom": "2020-12-30T02:34:34.327Z",
    "dataTo": "2020-12-30T02:34:34.327Z",
    "localizationStart": {
      "id": 0,
      "city": "string"
    },
    "localizationEnd": {
      "id": 0,
      "city": "string"
    },
    "price": 0
  }
]
GET
​/reservation​/get-all-user?id = id  
[
  {
    "idrent": 0,
    "car": {
      "idcar": 0,
      "mark": "string",
      "model": "string",
      "type": "string",
      "yearProduction": 0,
      "color": "string",
      "engineCapacity": 0,
      "money": 0,
      "image": "string",
      "localization": {
        "id": 0,
        "city": "string"
      }
    },
    "dataFrom": "2020-12-30T02:34:34.327Z",
    "dataTo": "2020-12-30T02:34:34.327Z",
    "localizationStart": {
      "id": 0,
      "city": "string"
    },
    "localizationEnd": {
      "id": 0,
      "city": "string"
    },
    "price": 0
  }
]
authentication-controller
POST 
​/register
{
  "username": "string",
  "email": "string",
  "role": [
    "string"
  ],
  "password": "string"
}
POST 
​/authentication
{
  "username": "string",
  "password": "string"
}  

Response  
{
    "token": "string",
    "type": "string",
    "id": 0,
    "username": "string",
    "email": "string",
    "localizations": [
        {
            "id": 0,
            "city": "string"
        }
    ],
    "roles": [
        "string",
        "string"
    ]
}
localization-controller
POST 
​/city​/add
{
  "city": "string"
}
GET 
​/city​/show-id?id = id  

{
    "id": 0,
    "city": "string"
}
GET
​/city​/show-cit?city = city
{
    "id": 0,
    "city": "string"
}
GET
​/city​/show-all
[
  {
    "id": 0,
    "city": "string"
  },
  {
    "id": 0,
    "city": "string"
  }
]
car-controller
POST
​/car​/get-cars  
{
  "city": "string",
  "dateFrom": "string",
  "dateTo": "string"
}
PUT
​/car​/edit-car?id = id
{
  "mark": "string",
  "model": "string",
  "type": "string",
  "yearProduction": 0,
  "color": "string",
  "engine": 0,
  "city": "string",
  "money": 0,
  "image": "string"
}
DELETE
​/car​/delete-car?id = id
POST
​/car​/addcar  
{
  "mark": "string",
  "model": "string",
  "type": "string",
  "yearProduction": 0,
  "color": "string",
  "engine": 0,
  "city": "string",
  "money": 0,
  "image": "string"
}
GET
​/car​/show-car-all
  [
   {
      "idcar": 0,
      "mark": "string",
      "model": "string",
      "type": "string",
      "yearProduction": 0,
      "color": "string",
      "engineCapacity": 0,
      "money": 0,
      "image": "string",
      "localization": {
        "id": 0,
        "city": "string"
      }
    },
    {
      "idcar": 0,
      "mark": "string",
      "model": "string",
      "type": "string",
      "yearProduction": 0,
      "color": "string",
      "engineCapacity": 0,
      "money": 0,
      "image": "string",
      "localization": {
        "id": 0,
        "city": "string"
      }
    },
    
  ]
GET
​/car​/get-car?id = id
    {
      "idcar": 0,
      "mark": "string",
      "model": "string",
      "type": "string",
      "yearProduction": 0,
      "color": "string",
      "engineCapacity": 0,
      "money": 0,
      "image": "string",
      "localization": {
        "id": 0,
        "city": "string"
      }
    },
GET
​/car​/get-car-localization?city = city  
  [
   {
      "idcar": 0,
      "mark": "string",
      "model": "string",
      "type": "string",
      "yearProduction": 0,
      "color": "string",
      "engineCapacity": 0,
      "money": 0,
      "image": "string",
      "localization": {
        "id": 0,
        "city": "string"
      }
    },
    {
      "idcar": 0,
      "mark": "string",
      "model": "string",
      "type": "string",
      "yearProduction": 0,
      "color": "string",
      "engineCapacity": 0,
      "money": 0,
      "image": "string",
      "localization": {
        "id": 0,
        "city": "string"
      }
    },
    
  ]
test-controller
GET
​/test​/user  
{
  "message": "string"
}
GET
​/test​/all
string
GET
​/test​/admin
{
  "message": "string"
}
admin-controller
GET
​/admin​/test  
"string"
GET
​/admin​/about  
"string"