Skip to content

Commit

Permalink
Merge pull request #25 from UdL-EPS-SoftArch/crud-SocialNetworks
Browse files Browse the repository at this point in the history
Crud social networks
  • Loading branch information
rogargon authored Feb 22, 2024
2 parents 9cf437b + 63340ec commit e614790
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package cat.udl.eps.softarch.demo.domain;

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

Expand All @@ -13,7 +9,11 @@
public class SocialNetworks extends UriEntity<Long> {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
Long id;
String instagram;
String twitter;
private Long id;
private String instagram;
private String twitter;

@ManyToOne
public Shelter belongsTo;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package cat.udl.eps.softarch.demo.repository;

import cat.udl.eps.softarch.demo.domain.SocialNetworks;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

@RepositoryRestResource
public interface SocialNetworksRepository extends CrudRepository<SocialNetworks,Long> {

}

0 comments on commit e614790

Please sign in to comment.