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
1d28629b
authored
Feb 13, 2025
by
Rubén Ramírez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat: [Genero]: Creada la clase Genero con los atributos básicos
parent
5c30f7e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
src/main/java/com/ujaen/tfg/mangaffinity/entidades/Capitulo.java
src/main/java/com/ujaen/tfg/mangaffinity/entidades/Genero.java
src/main/java/com/ujaen/tfg/mangaffinity/entidades/Capitulo.java
0 → 100644
View file @
1d28629b
package
com
.
ujaen
.
tfg
.
mangaffinity
.
entidades
;
import
jakarta.persistence.*
;
import
lombok.*
;
import
jakarta.validation.constraints.NotBlank
;
import
jakarta.validation.constraints.Positive
;
@Entity
@Table
(
name
=
"capitulos"
)
@Getter
@NoArgsConstructor
public
class
Capitulo
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@Positive
@Column
(
nullable
=
false
)
private
int
numero
;
@NotBlank
@Column
(
nullable
=
false
)
private
String
titulo
;
@NotBlank
@Column
(
nullable
=
false
,
unique
=
true
)
private
String
url
;
@NotBlank
@Column
(
nullable
=
false
)
private
String
fuente
;
// Constructor con parámetros
public
Capitulo
(
int
numero
,
String
titulo
,
String
url
,
String
fuente
)
{
this
.
numero
=
numero
;
this
.
titulo
=
titulo
;
this
.
url
=
url
;
this
.
fuente
=
fuente
;
}
}
src/main/java/com/ujaen/tfg/mangaffinity/entidades/Genero.java
0 → 100644
View file @
1d28629b
package
com
.
ujaen
.
tfg
.
mangaffinity
.
entidades
;
import
jakarta.persistence.*
;
import
lombok.*
;
import
jakarta.validation.constraints.NotBlank
;
@Entity
@Table
(
name
=
"generos"
)
@Getter
@NoArgsConstructor
public
class
Genero
{
@Id
@NotBlank
@Column
(
nullable
=
false
,
unique
=
true
)
private
String
nombre
;
public
Genero
(
String
nombre
)
{
this
.
nombre
=
nombre
;
}
}
\ No newline at end of file
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