Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Equipo 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
migudel
Equipo 3
Commits
f7fc6df0
Commit
f7fc6df0
authored
9 months ago
by
migudel
Browse files
Options
Downloads
Patches
Plain Diff
Conflictos II
parent
b0737484
No related branches found
No related tags found
2 merge requests
!26
Revert "Funciona register"
,
!25
Dev/angular microservicios
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
angular/RestClient/src/app/app.routes.ts
+93
-14
93 additions, 14 deletions
angular/RestClient/src/app/app.routes.ts
java/services/auth/src/main/java/com/uva/authentication/models/remote/User.java
+95
-0
95 additions, 0 deletions
.../main/java/com/uva/authentication/models/remote/User.java
with
188 additions
and
14 deletions
angular/RestClient/src/app/app.routes.ts
+
93
−
14
View file @
f7fc6df0
...
@@ -5,41 +5,120 @@ import { HotelRegisterComponent } from './core/features/hotel/hotel-register/hot
...
@@ -5,41 +5,120 @@ import { HotelRegisterComponent } from './core/features/hotel/hotel-register/hot
import
{
MainPageComponent
}
from
'
./core/features/user/main-page/main-page.component
'
;
import
{
MainPageComponent
}
from
'
./core/features/user/main-page/main-page.component
'
;
import
{
BookingListComponent
}
from
'
./core/features/bookings/booking-list/booking-list.component
'
;
import
{
BookingListComponent
}
from
'
./core/features/bookings/booking-list/booking-list.component
'
;
import
{
UserBookingListComponent
}
from
'
./core/features/user/user-booking-list/user-booking-list.component
'
;
import
{
UserBookingListComponent
}
from
'
./core/features/user/user-booking-list/user-booking-list.component
'
;
import
{
LoginComponent
}
from
'
./core/features/auth/login/login.component
'
;
import
{
LoginComponent
}
from
'
./core/features/auth/login/login.component
'
;
import
{
UserFormComponent
}
from
'
./core/features/user/user-form/user-form.component
'
;
export
const
routes
:
Routes
=
[
export
const
routes
:
Routes
=
[
{
{
path
:
''
,
// Ruta principal
path
:
''
,
// Ruta principal
component
:
MainPageComponent
,
// Componente de la página principal
component
:
MainPageComponent
,
},
},
// auth
{
{
path
:
'
bookings/search
'
,
path
:
'
login
'
,
component
:
BookingList
Component
,
component
:
Login
Component
,
},
},
{
{
path
:
'
bookings/new
'
,
path
:
'
register
'
,
component
:
BookingComponent
,
},
},
// Hoteles
{
{
path
:
'
users/:id/bookings
'
,
path
:
'
hotels
'
,
// Ruta para la lista de hoteles
component
:
UserBookingListComponent
,
},
},
{
{
path
:
'
hotels
'
,
path
:
'
hotels/register
'
,
// Registrar nuevo hotel
component
:
HotelListComponent
,
},
},
{
{
path
:
'
hotels/new
'
,
path
:
'
hotels/:id
'
,
// Hotel concreto
component
:
HotelRegisterComponent
,
},
},
{
{
path
:
'
hotels/:id
'
,
path
:
'
hotels/:id/edit
'
,
// Modificar hotel
component
:
HotelRegisterComponent
,
},
// Usuario
{
path
:
'
me
'
,
// Main
},
{
path
:
'
me/edit
'
,
// Main
},
// Usuario HOTEL admin
{
path
:
'
me/hotels
'
,
},
{
path
:
'
me/hotels/:id
'
,
},
},
{
{
path
:
'
auth/login
'
,
path
:
'
auth/login
'
,
component
:
LoginComponent
,
},
},
{
path
:
'
me/hotels/:id/bookings
'
,
},
{
path
:
'
me/hotels/:id/rooms
'
,
},
{
path
:
'
me/hotels/:id/rooms/:id
'
,
},
{
path
:
'
me/hotels/:id/rooms/:id/bookings
'
,
},
// Usuario Cliente
{
path
:
'
me/bookings
'
,
},
{
path
:
'
me/bookings/:id
'
,
},
{
path
:
'
me/bookings/new
'
,
},
// Administrador
{
path
:
'
admin
'
,
// Main
},
{
path
:
'
admin/users
'
,
// Main
},
{
path
:
'
admin/users/:id
'
,
// Main
},
// ! OTRO // NO MIRAR
// {
// path: 'bookings/search',
// component: BookingListComponent,
// },
// {
// path: 'bookings/new',
// component: BookingComponent,
// },
// {
// path: 'users/:id/bookings',
// component: UserBookingListComponent,
// },
// {
// path: 'hotels',
// component: HotelListComponent,
// },
// {
// path: 'hotels/new',
// component: HotelRegisterComponent,
// },
// {
// path: 'hotels/:id',
// component: HotelRegisterComponent,
// },
// {
// path: 'users/:id',
// component: UserFormComponent,
// },
// {
// path: 'register',
// component: UserFormComponent,
// },
{
{
path
:
'
**
'
,
path
:
'
**
'
,
redirectTo
:
''
,
redirectTo
:
''
,
...
...
This diff is collapsed.
Click to expand it.
java/services/auth/src/main/java/com/uva/authentication/models/remote/User.java
0 → 100644
+
95
−
0
View file @
f7fc6df0
package
com.uva.authentication.models.remote
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
jakarta.persistence.Basic
;
import
jakarta.persistence.Column
;
import
jakarta.persistence.Entity
;
import
jakarta.persistence.EnumType
;
import
jakarta.persistence.Enumerated
;
import
jakarta.persistence.GeneratedValue
;
import
jakarta.persistence.GenerationType
;
import
jakarta.persistence.Id
;
import
jakarta.persistence.Inheritance
;
import
jakarta.persistence.InheritanceType
;
import
jakarta.persistence.Table
;
@Entity
@Inheritance
(
strategy
=
InheritanceType
.
JOINED
)
@Table
(
name
=
"users"
)
public
class
User
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Basic
(
optional
=
false
)
@Column
(
nullable
=
false
)
private
int
id
;
@Basic
(
optional
=
false
)
@Column
(
nullable
=
false
)
private
String
name
;
@Basic
(
optional
=
false
)
@Column
(
nullable
=
false
,
unique
=
true
)
private
String
email
;
@JsonIgnore
@Basic
(
optional
=
false
)
@Column
(
nullable
=
false
)
private
String
password
;
@Basic
(
optional
=
false
)
@Column
(
nullable
=
false
)
@Enumerated
(
EnumType
.
STRING
)
private
UserRol
rol
=
UserRol
.
CLIENT
;
public
User
()
{
}
public
User
(
int
id
,
String
name
,
String
email
,
String
password
,
UserRol
rol
)
{
setId
(
id
);
setName
(
name
);
setEmail
(
email
);
setRol
(
rol
);
}
public
int
getId
()
{
return
this
.
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getEmail
()
{
return
this
.
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
rawPassword
)
{
this
.
password
=
rawPassword
;
}
public
UserRol
getRol
()
{
return
this
.
rol
;
}
public
void
setRol
(
UserRol
rol
)
{
this
.
rol
=
rol
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment