-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5567b40
commit 7f5775c
Showing
5 changed files
with
78 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
practica/src/main/java/com/practica/demo/TournamentRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.practica.demo; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import com.practica.demo.data.Tournament; | ||
import com.practica.demo.data.user.User; | ||
|
||
public interface TournamentRepository extends JpaRepository<Tournament, Integer>{ | ||
|
||
Tournament findByname(String name); | ||
|
||
|
||
} |
38 changes: 38 additions & 0 deletions
38
practica/src/main/java/com/practica/demo/data/Tournament.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.practica.demo.data; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
|
||
@Entity | ||
public class Tournament { | ||
@Id | ||
private int idTournament; | ||
|
||
private int numTeams; | ||
private String name; | ||
private String description; | ||
|
||
public int getIdTournament() { | ||
return idTournament; | ||
} | ||
public void setIdTournament(int idTournament) { | ||
this.idTournament = idTournament; | ||
} | ||
public int getNumTeams() { | ||
return numTeams; | ||
} | ||
public void setNumTeams(int numTeams) { | ||
this.numTeams = numTeams; | ||
} | ||
public String getName() { | ||
return name; | ||
} | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
public String getDescription() { | ||
return description; | ||
} | ||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters