Skip to content

Commit

Permalink
Merge pull request #62 from UdL-EPS-SoftArch/crud-Shelter
Browse files Browse the repository at this point in the history
Crud shelter
  • Loading branch information
rogargon authored Mar 7, 2024
2 parents 1d21f15 + a0bd115 commit d7af9ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/main/java/cat/udl/eps/softarch/demo/domain/Shelter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class Shelter extends UriEntity<Long> {
private Long id;

@NotBlank
@Column(unique = true)
private String name;

@NotBlank
Expand All @@ -36,10 +37,12 @@ public class Shelter extends UriEntity<Long> {
private String mobile;

@PastOrPresent
@GeneratedValue(strategy = GenerationType.AUTO)
@NotNull
private ZonedDateTime createdAt;

@PastOrPresent
@GeneratedValue(strategy = GenerationType.AUTO)
private ZonedDateTime updatedAt;

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@

@RepositoryRestResource
public interface ShelterRepository extends CrudRepository<Shelter, Long>, PagingAndSortingRepository<Shelter, Long> {
List<Shelter> findByLocatedAt(@Param("location") Location locatedAt);

List<Shelter> findByName(@Param("name") String name);
}

0 comments on commit d7af9ba

Please sign in to comment.