Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Rubén Ramírez
/
MangAffinity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e8628c2d
authored
Mar 06, 2025
by
Rubén Ramírez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat: [Recurso]: Añadido a recurso, dto y mapper el nuevo atributo para tener imágenes
parent
06a8ae78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
src/main/java/com/ujaen/tfg/mangaffinity/entidades/Recurso.java
src/main/java/com/ujaen/tfg/mangaffinity/rest/DTO/DTORecurso.java
src/main/java/com/ujaen/tfg/mangaffinity/rest/DTO/Mapper.java
src/main/java/com/ujaen/tfg/mangaffinity/entidades/Recurso.java
View file @
e8628c2d
...
...
@@ -39,6 +39,8 @@ public class Recurso {
@Column
(
nullable
=
false
)
private
String
autor
;
private
String
fotoUrl
;
@ElementCollection
(
targetClass
=
Genero
.
class
)
@Enumerated
(
EnumType
.
STRING
)
...
...
@@ -51,11 +53,12 @@ public class Recurso {
@OneToMany
(
mappedBy
=
"recurso"
)
private
List
<
Capitulo
>
capitulos
=
new
ArrayList
<>();
public
Recurso
(
String
titulo
,
String
descripcion
,
LocalDate
fechaPublicacion
,
String
autor
)
{
public
Recurso
(
String
titulo
,
String
descripcion
,
LocalDate
fechaPublicacion
,
String
autor
,
String
fotoUrl
)
{
this
.
titulo
=
titulo
;
this
.
descripcion
=
descripcion
;
this
.
fechaPublicacion
=
fechaPublicacion
;
this
.
autor
=
autor
;
this
.
fotoUrl
=
fotoUrl
;
}
...
...
src/main/java/com/ujaen/tfg/mangaffinity/rest/DTO/DTORecurso.java
View file @
e8628c2d
...
...
@@ -29,5 +29,7 @@ public class DTORecurso {
@NotBlank
private
String
autor
;
private
String
fotoUrl
;
private
Set
<
Genero
>
generos
=
new
HashSet
<>();
}
src/main/java/com/ujaen/tfg/mangaffinity/rest/DTO/Mapper.java
View file @
e8628c2d
...
...
@@ -28,6 +28,7 @@ public class Mapper {
recurso
.
getDescripcion
(),
recurso
.
getFechaPublicacion
(),
recurso
.
getAutor
(),
recurso
.
getFotoUrl
()
,
recurso
.
getGeneros
()
);
}
...
...
@@ -37,7 +38,8 @@ public class Mapper {
dtoRecurso
.
getTitulo
(),
dtoRecurso
.
getDescripcion
(),
dtoRecurso
.
getFechaPublicacion
(),
dtoRecurso
.
getAutor
()
dtoRecurso
.
getAutor
(),
dtoRecurso
.
getFotoUrl
()
);
if
(
dtoRecurso
.
getGeneros
()
!=
null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment