Commit a5c8977d authored by Heber Cordova's avatar Heber Cordova

feat: added config for docker containers

parent 09e16b81
version: '3.6' version: '3.6'
services: services:
app:
image: nginx:latest
container_name: flight-booking-app
ports:
- "8081:80"
volumes:
- ./flight-agency-app/dist/flight-agency-app:/usr/share/nginx/html
- ./flight-agency-app/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- my-flight-app-network
database: database:
image: mysql:latest image: mysql:latest
container_name: flight-booking-db container_name: flight-booking-db
environment: environment:
- MYSQL_ROOT_PASSWORD=admin MYSQL_ROOT_PASSWORD: hbcordova
ports: ports:
- "3307:3306" - "3307:3306"
networks: networks:
- my-flight-app-network - my-flight-app-network
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
api: api:
build: ./flight-agency-api build: ./flight-agency-api
container_name: flight-booking-api container_name: flight-booking-api
restart: always
ports: ports:
- "8082:8080" - "8082:8080"
depends_on: depends_on:
- database - database
networks: networks:
- my-flight-app-network - my-flight-app-network
app:
image: nginx:latest
container_name: flight-booking-app
ports:
- "8081:80"
volumes:
- ./flight-agency-app/dist/flight-agency-app:/usr/share/nginx/html
- ./flight-agency-app/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- my-flight-app-network
networks: networks:
my-flight-app-network: my-flight-app-network:
...@@ -34,8 +34,8 @@ public class SecurityConfig { ...@@ -34,8 +34,8 @@ public class SecurityConfig {
@Bean @Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.csrf(AbstractHttpConfigurer::disable) http.csrf(AbstractHttpConfigurer::disable)
.authorizeHttpRequests(request -> request.requestMatchers("/api/v1/auth/**") .authorizeHttpRequests(request -> request.requestMatchers("/**")
.permitAll().anyRequest().authenticated()) .permitAll().anyRequest().permitAll())
.cors(cors -> cors.configurationSource(corsConfigurationSource())) .cors(cors -> cors.configurationSource(corsConfigurationSource()))
.sessionManagement(manager -> manager.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .sessionManagement(manager -> manager.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authenticationProvider(authenticationProvider()).addFilterBefore( .authenticationProvider(authenticationProvider()).addFilterBefore(
...@@ -46,9 +46,10 @@ public class SecurityConfig { ...@@ -46,9 +46,10 @@ public class SecurityConfig {
@Bean @Bean
CorsConfigurationSource corsConfigurationSource() { CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration(); CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Arrays.asList("http://localhost:4200"));
configuration.setAllowedMethods(Arrays.asList("*", "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
configuration.applyPermitDefaultValues(); configuration.applyPermitDefaultValues();
configuration.addAllowedOrigin("*");
// configuration.setAllowedOrigins(Arrays.asList("https://b8cf-201-218-130-89.ngrok-free.app", "http://localhost:4200"));
// configuration.setAllowedMethods(Arrays.asList("*", "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", configuration); source.registerCorsConfiguration("/**", configuration);
return source; return source;
......
# METADATA # METADATA
db.host=my-flight-app-network #db.host=my-flight-app-network
jwt.signin.key=aJncb8DoBw4eNK4syWvjpbs8xQkVJDeLE2cthyQYfnc4p2XpsMuamKDe4HxUCXQT jwt.signin.key=aJncb8DoBw4eNK4syWvjpbs8xQkVJDeLE2cthyQYfnc4p2XpsMuamKDe4HxUCXQT
# app.port=8080 # app.port=8080
# SERVER # SERVER
server.port=8085 server.port=8080
# MYSQL # MYSQL
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# spring.datasource.url=jdbc:mysql://${db.host}:localhost}:3306/flightdatabase?useSSL=false&createDatabaseIfNotExists=true spring.datasource.url=jdbc:mysql://database:3306/flightdatabase?allowPublicKeyRetrieval=true&createDatabaseIfNotExists=true&useSSL=false
spring.datasource.url=jdbc:mysql://localhost:3306/flightdatabase?useSSL=false&createDatabaseIfNotExists=true # spring.datasource.url=jdbc:mysql://localhost:3306/flightdatabase?useSSL=false&createDatabaseIfNotExists=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=hbcordova spring.datasource.password=hbcordova
# JPA # JPA
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect
# spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect spring.jpa.generate-ddl=true
spring.jpa.show-sql=true spring.jpa.show-sql=true
\ No newline at end of file
...@@ -54,8 +54,13 @@ ...@@ -54,8 +54,13 @@
"optimization": false, "optimization": false,
"vendorChunk": true, "vendorChunk": true,
"extractLicenses": false, "extractLicenses": false,
"sourceMap": true, "namedChunks": true,
"namedChunks": true "fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.development.ts"
}
]
} }
}, },
"defaultConfiguration": "production" "defaultConfiguration": "production"
......
{ {
"/api": { "/api": {
"target": "http://localhost:8085", "target": "http://localhost:8050",
"secure": false "secure": false
} }
} }
...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http'; ...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Airport } from '../interfaces/airport.interface'; import { Airport } from '../interfaces/airport.interface';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class AirportsService { export class AirportsService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
private BASE_URL: string = 'http://localhost:8085/api/v1/airports'; private BASE_URL: string = `${environment.url}/api/v1/airports`;
getAll(): Observable<Airport[]> { getAll(): Observable<Airport[]> {
return this.http.get<Airport[]>(this.BASE_URL, { headers }); return this.http.get<Airport[]>(this.BASE_URL, { headers });
......
...@@ -2,12 +2,13 @@ import { Injectable } from '@angular/core'; ...@@ -2,12 +2,13 @@ import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Booking } from '../interfaces/booking.interface'; import { Booking } from '../interfaces/booking.interface';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class BookingService { export class BookingService {
constructor(private httpClient: HttpClient) { } constructor(private httpClient: HttpClient) { }
private BASE_URL: string = 'http://localhost:3000/bookings'; private BASE_URL: string = `${environment.url}/api/v1/bookings`;
getAll(): Observable<Booking[]> { getAll(): Observable<Booking[]> {
return this.httpClient.get<Booking[]>(this.BASE_URL); return this.httpClient.get<Booking[]>(this.BASE_URL);
......
...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http'; ...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http';
import { Passenger } from '../interfaces/passenger.interface'; import { Passenger } from '../interfaces/passenger.interface';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class PassengerService { export class PassengerService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
URL_BASE: string = 'http://localhost:8085/api/v1/passengers'; URL_BASE: string = `${environment.url}/api/v1/passengers`;
getAll(): Observable<Passenger[]> { getAll(): Observable<Passenger[]> {
return this.http.get<Passenger[]>(this.URL_BASE, { headers }); return this.http.get<Passenger[]>(this.URL_BASE, { headers });
......
...@@ -5,12 +5,13 @@ import { Observable, tap } from 'rxjs'; ...@@ -5,12 +5,13 @@ import { Observable, tap } from 'rxjs';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { ReservationSave } from '../interfaces/reservation-save.interface'; import { ReservationSave } from '../interfaces/reservation-save.interface';
import { ReservationDetail } from 'src/app/passenger/interfaces/reservation-detail.interface'; import { ReservationDetail } from 'src/app/passenger/interfaces/reservation-detail.interface';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class ReservationsService { export class ReservationsService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
URL_BASE: string = 'http://localhost:8085/api/v1/reservations'; URL_BASE: string = `${environment.url}/api/v1/reservations`;
getAll(): Observable<Reservation[]> { getAll(): Observable<Reservation[]> {
return this.http.get<Reservation[]>(this.URL_BASE, { headers}); return this.http.get<Reservation[]>(this.URL_BASE, { headers});
......
...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http'; ...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { FlightClass } from '../interfaces/flight-class.interface'; import { FlightClass } from '../interfaces/flight-class.interface';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class TicketClassService { export class TicketClassService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
private BASE_URL: string = 'http://localhost:8085/api/v1/travel-classes'; private BASE_URL: string = `${environment.url}/api/v1/ticket-classes`;
getAll(): Observable<FlightClass[]> { getAll(): Observable<FlightClass[]> {
return this.http.get<FlightClass[]>(this.BASE_URL, { headers }); return this.http.get<FlightClass[]>(this.BASE_URL, { headers });
......
...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http'; ...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http';
import { TicketType } from '../interfaces/ticket-type.interface'; import { TicketType } from '../interfaces/ticket-type.interface';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class TicketTypeService { export class TicketTypeService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
private BASE_URL: string = 'http://localhost:8085/api/v1/ticket-types'; private BASE_URL: string = `${environment.url}/api/v1/ticket-types`;
getAll(): Observable<TicketType[]> { getAll(): Observable<TicketType[]> {
return this.http.get<TicketType[]>(this.BASE_URL, { headers }); return this.http.get<TicketType[]>(this.BASE_URL, { headers });
......
...@@ -4,12 +4,13 @@ import { SecurityCredentials } from '../models/security-credentials.interface'; ...@@ -4,12 +4,13 @@ import { SecurityCredentials } from '../models/security-credentials.interface';
import { SecurityResponse } from '../models/security-response.interface'; import { SecurityResponse } from '../models/security-response.interface';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { environment } from '../../../environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class SecurityService { export class SecurityService {
constructor(private http: HttpClient, private router: Router) { } constructor(private http: HttpClient, private router: Router) { }
URL_BASE: string = 'http://localhost:8085/api/v1/auth/'; URL_BASE: string = `${environment.url}/api/v1/auth/`;
get currentUser(): SecurityResponse | null { get currentUser(): SecurityResponse | null {
const userLocalStorage = localStorage.getItem('userLogged'); const userLocalStorage = localStorage.getItem('userLogged');
......
...@@ -3,12 +3,13 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; ...@@ -3,12 +3,13 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Agent, AgentExtended, AgentSave } from '../interfaces/agent.interface'; import { Agent, AgentExtended, AgentSave } from '../interfaces/agent.interface';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class AgentsService { export class AgentsService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
private BASE_URL: string = 'http://localhost:8085/api/v1/agents'; private BASE_URL: string = `${environment.url}/api/v1/agents`;
getAll(): Observable<Agent[]> { getAll(): Observable<Agent[]> {
console.log(headers) console.log(headers)
......
...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http'; ...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Aircraft } from '../interfaces/aircraft.interface'; import { Aircraft } from '../interfaces/aircraft.interface';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class AircraftService { export class AircraftService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
URL_BASE: string = 'http://localhost:8085/api/v1/aircrafts'; URL_BASE: string = `${environment.url}/api/v1/aircrafts`;
getAll(): Observable<Aircraft[]> { getAll(): Observable<Aircraft[]> {
return this.http.get<Aircraft[]>(this.URL_BASE, { headers }); return this.http.get<Aircraft[]>(this.URL_BASE, { headers });
......
...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http'; ...@@ -3,12 +3,13 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Airline } from '../interfaces/airline.interface'; import { Airline } from '../interfaces/airline.interface';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class AirlineService { export class AirlineService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
BASE_URL = 'http://localhost:8085/api/v1/airlines'; BASE_URL = `${environment.url}/api/v1/airlines`;
getAll(): Observable<Airline[]> { getAll(): Observable<Airline[]> {
return this.http.get<Airline[]>(this.BASE_URL, { headers }); return this.http.get<Airline[]>(this.BASE_URL, { headers });
......
...@@ -5,12 +5,13 @@ import { Flight } from '../interfaces/flight.interface'; ...@@ -5,12 +5,13 @@ import { Flight } from '../interfaces/flight.interface';
import { FlightTable } from '../interfaces/flight-table.interface'; import { FlightTable } from '../interfaces/flight-table.interface';
import { FlightSave } from '../interfaces/flight-save.interface'; import { FlightSave } from '../interfaces/flight-save.interface';
import { headers } from 'src/app/shared/utils/header.util'; import { headers } from 'src/app/shared/utils/header.util';
import { environment } from 'src/environments/environment';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class FlightService { export class FlightService {
constructor(private http: HttpClient) { } constructor(private http: HttpClient) { }
URL_BASE: string = 'http://localhost:8085/api/v1/flights'; URL_BASE: string = `${environment.url}/api/v1/flights`;
getAll(): Observable<FlightTable[]> { getAll(): Observable<FlightTable[]> {
return this.http.get<FlightTable[]>(this.URL_BASE, { headers}); return this.http.get<FlightTable[]>(this.URL_BASE, { headers});
......
export const environment = {
production: false,
url: 'http://localhost:8082'
};
export const environment = {
production: true,
url: 'http://localhost:8082'
};
CREATE SCHEMA IF NOT EXISTS flightdatabase;
USE flightdatabase;
CREATE TABLE IF NOT EXISTS roles (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS users (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
lastname VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
role_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (role_id) REFERENCES roles(id)
);
CREATE TABLE IF NOT EXISTS airports (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
location VARCHAR(255) NOT NULL,
code VARCHAR(3) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS airlines (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
code VARCHAR(2) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS aircrafts (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
manufacturer VARCHAR(255) NOT NULL,
model VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS ticket_type (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS travel_class (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS reservation_status (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS payment_status (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS supervisors (
id INT NOT NULL AUTO_INCREMENT,
created_at DATE NOT NULL,
details VARCHAR(255) NOT NULL,
user_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE TABLE IF NOT EXISTS agents (
id INT NOT NULL AUTO_INCREMENT,
created_at DATE NOT NULL,
details VARCHAR(255) NOT NULL,
user_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE TABLE IF NOT EXISTS passengers (
id INT NOT NULL AUTO_INCREMENT,
created_at DATE NOT NULL,
address VARCHAR(255) NOT NULL,
city VARCHAR(255) NOT NULL,
country VARCHAR(255) NOT NULL,
phone VARCHAR(255) NOT NULL,
user_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
);
INSERT INTO roles (name) VALUES ('supervisor'), ('agent'), ('passenger');
INSERT INTO airports (name, location, code)
VALUES
('Jorge Chavez International Airport', 'Lima, Peru', 'LIM'),
('John F. Kennedy International Airport', 'New York, USA', 'JFK'),
('Heathrow Airport', 'London, UK', 'LHR'),
('Charles de Gaulle Airport', 'Paris, France', 'CDG'),
('Los Angeles International Airport', 'Los Angeles, USA', 'LAX'),
('Sydney Kingsford Smith Airport', 'Sydney, Australia', 'SYD'),
('Dubai International Airport', 'Dubai, UAE', 'DXB'),
('Beijing Capital International Airport', 'Beijing, China', 'PEK'),
('Benito Juarez International Airport', 'Mexico City, Mexico', 'MEX'),
('Frankfurt Airport', 'Frankfurt, Germany', 'FRA'),
('Toronto Pearson International Airport', 'Toronto, Canada', 'YYZ'),
('Incheon International Airport', 'Seoul, South Korea', 'ICN'),
('Sao Paulo-Guarulhos International Airport', 'Sao Paulo, Brazil', 'GRU'),
('Barcelona-El Prat Airport', 'Barcelona, Spain', 'BCN'),
('Cairo International Airport', 'Cairo, Egypt', 'CAI');
INSERT INTO airlines (name, code) VALUES
('American Airlines', 'AA'),
('Delta Air Lines', 'DL'),
('United Airlines', 'UA'),
('Emirates', 'EK'),
('Lufthansa', 'LH'),
('British Airways', 'BA'),
('Qatar Airways', 'QR'),
('Air France', 'AF'),
('LATAM Airlines', 'LA');
INSERT INTO aircrafts (name, manufacturer, model) VALUES
('Boeing 737', 'Boeing', '737-800'),
('Airbus A320', 'Airbus', 'A320-200'),
('Boeing 787 Dreamliner', 'Boeing', '787-9'),
('Embraer E175', 'Embraer', 'E175');
INSERT INTO ticket_type (name) VALUES ('Economy'), ('Business'), ('First Class');
INSERT INTO travel_class (name) VALUES ('Economy'), ('Business'), ('First Class');
INSERT INTO reservation_status (name) VALUES ('registered'), ('processing_payment'), ('Cancelled'), ('paid');
INSERT INTO payment_status (name) VALUES ('pending'), ('paid'), ('refunded');
INSERT INTO users (email,lastname,name,password,role_id) values ("supervisor@gmail.com", "Loayza", "Roberto", "$2a$10$x2mZN5ZT0qnfUDWPFww/Ke4/UjgLRFVyEl4G/gd8kiBRZBvv4wzEO", 1);
INSERT INTO users (email,lastname,name,password,role_id) values ("agent@gmail.com", "Cordova", "Heber", "$2a$10$BFGbKrtQ67FENKMNXAR6deaICZ33m2fv4QoHMGHWlX1JNsmdR/Z5O", 2);
INSERT INTO users (email,lastname,name,password,role_id) values ("passenger@gmail.com", "DeTal", "Fulanito", "$2a$10$ks1w2U1QSCJyngLuM1X0aOnFRHa7eqG6rmb9WEOlZMjyICLhABMZe", 3);
INSERT INTO supervisors (created_at,details,user_id) values ("2023-11-08", "", 1);
INSERT INTO agents (created_at,details,user_id) values ("2023-11-08", "", 2);
INSERT INTO passengers (created_at,address, city, country, phone,user_id) values ("2023-11-08", "Calle Agusto Wiese 345", "Lima", "Peru", "987654321", 3);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment