Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Entity
@Table(schema = "event", name = "attendances")
@Getter @Setter @NoArgsConstructor @AllArgsConstructor
public class Attendance {
public class AttendanceEntity {

// Composite PK: (event_id, member_id).
// event_id references event.event(id).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Entity
@Table(schema = "event", name = "events")
@Getter @Setter @NoArgsConstructor
public class Event {
public class EventEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand All @@ -45,13 +45,13 @@ public class Event {

@OneToMany
@JoinColumn(name = "event_id", referencedColumnName = "id", insertable = false, updatable = false)
private List<Attendance> attendees;
private List<AttendanceEntity> attendees;

@OneToMany
@JoinColumn(name = "event_id", referencedColumnName = "id", insertable = false, updatable = false)
private List<SportEvent> sportsLinked;
private List<SportEventEntity> sportsLinked;

@OneToMany
@JoinColumn(name = "event_id", referencedColumnName = "id", insertable = false, updatable = false)
private List<TeamEvent> teamsLinked;
private List<TeamEventEntity> teamsLinked;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Entity
@Table(schema = "event", name = "sport_events")
@Getter @Setter @NoArgsConstructor @AllArgsConstructor
public class SportEvent {
public class SportEventEntity {

// Composite PK: (event_id, sport_name).
// event_id references event.event(id).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Entity
@Table(schema = "event", name = "team_events")
@Getter @Setter @NoArgsConstructor @AllArgsConstructor
public class TeamEvent {
public class TeamEventEntity {

// Composite PK: (event_id, team_id).
// event_id references event.event(id).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.eventservice.entity.Attendance;
import tum.devoops.eventservice.entity.AttendanceEntity;

public interface AttendanceRepository extends JpaRepository<Attendance, Attendance.Id> {
public interface AttendanceRepository extends JpaRepository<AttendanceEntity, AttendanceEntity.Id> {

// SELECT * FROM event.attendances WHERE event_id = ?
List<Attendance> findAllById_EventId(UUID eventId);
List<AttendanceEntity> findAllById_EventId(UUID eventId);

// SELECT * FROM event.attendances WHERE member_id = ?
List<Attendance> findAllById_MemberId(UUID memberId);
List<AttendanceEntity> findAllById_MemberId(UUID memberId);

// DELETE FROM event.attendances WHERE event_id = ?
void deleteAllById_EventId(UUID eventId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.eventservice.entity.Event;
import tum.devoops.eventservice.entity.EventEntity;

public interface EventRepository extends JpaRepository<Event, UUID> {
public interface EventRepository extends JpaRepository<EventEntity, UUID> {

// SELECT * FROM event.events WHERE creator_id = ?
List<Event> findAllByCreatorId(UUID creatorId);
List<EventEntity> findAllByCreatorId(UUID creatorId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.eventservice.entity.SportEvent;
import tum.devoops.eventservice.entity.SportEventEntity;

public interface SportEventRepository extends JpaRepository<SportEvent, SportEvent.Id> {
public interface SportEventRepository extends JpaRepository<SportEventEntity, SportEventEntity.Id> {

// SELECT * FROM event.sport_events WHERE event_id = ?
List<SportEvent> findAllById_EventId(UUID eventId);
List<SportEventEntity> findAllById_EventId(UUID eventId);

// SELECT * FROM event.sport_events WHERE sport_name = ?
List<SportEvent> findAllById_SportName(String sportName);
List<SportEventEntity> findAllById_SportName(String sportName);

// DELETE FROM event.sport_events WHERE event_id = ?
void deleteAllById_EventId(UUID eventId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.eventservice.entity.TeamEvent;
import tum.devoops.eventservice.entity.TeamEventEntity;

public interface TeamEventRepository extends JpaRepository<TeamEvent, TeamEvent.Id> {
public interface TeamEventRepository extends JpaRepository<TeamEventEntity, TeamEventEntity.Id> {

// SELECT * FROM event.team_events WHERE event_id = ?
List<TeamEvent> findAllById_EventId(UUID eventId);
List<TeamEventEntity> findAllById_EventId(UUID eventId);

// SELECT * FROM event.team_events WHERE team_id = ?
List<TeamEvent> findAllById_TeamId(UUID teamId);
List<TeamEventEntity> findAllById_TeamId(UUID teamId);

// DELETE FROM event.team_events WHERE event_id = ?
void deleteAllById_EventId(UUID eventId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@Entity
@Table(schema = "feedback", name = "feedback")
@Getter @Setter @NoArgsConstructor
public class Feedback {
public class FeedbackEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.feedbackservice.entity.Feedback;
import tum.devoops.feedbackservice.entity.FeedbackEntity;

public interface FeedbackRepository extends JpaRepository<Feedback, UUID> {
public interface FeedbackRepository extends JpaRepository<FeedbackEntity, UUID> {

// SELECT * FROM feedback.feedback WHERE event_id = ?
List<Feedback> findAllByEventId(UUID eventId);
List<FeedbackEntity> findAllByEventId(UUID eventId);

// SELECT * FROM feedback.feedback WHERE member_id = ?
List<Feedback> findAllByMemberId(UUID memberId);
List<FeedbackEntity> findAllByMemberId(UUID memberId);

// SELECT * FROM feedback.feedback WHERE creator_id = ?
List<Feedback> findAllByCreatorId(UUID creatorId);
List<FeedbackEntity> findAllByCreatorId(UUID creatorId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@Entity
@Table(schema = "finance", name = "transactions")
@Getter @Setter @NoArgsConstructor
public class Transaction {
public class TransactionEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.financeservice.entity.Transaction;
import tum.devoops.financeservice.entity.TransactionEntity;

public interface TransactionRepository extends JpaRepository<Transaction, UUID> {
public interface TransactionRepository extends JpaRepository<TransactionEntity, UUID> {

// SELECT * FROM finance.transactions WHERE member_id = ?
List<Transaction> findAllByMemberId(UUID memberId);
List<TransactionEntity> findAllByMemberId(UUID memberId);

// SELECT * FROM finance.transactions WHERE creator_id = ?
List<Transaction> findAllByCreatorId(UUID creatorId);
List<TransactionEntity> findAllByCreatorId(UUID creatorId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@Entity
@Table(schema = "member", name = "members")
@Getter @Setter @NoArgsConstructor
public class Member {
public class MemberEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.memberservice.entity.Member;
import tum.devoops.memberservice.entity.MemberEntity;

public interface MemberRepository extends JpaRepository<Member, UUID> {
public interface MemberRepository extends JpaRepository<MemberEntity, UUID> {

// SELECT * FROM member.members WHERE email = ? LIMIT 1
Optional<Member> findByEmail(String email);
Optional<MemberEntity> findByEmail(String email);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Entity
@Table(schema = "organization", name = "directors")
@Getter @Setter @NoArgsConstructor @AllArgsConstructor
public class Director {
public class DirectorEntity {

// Composite PK: (sport_name, member_id).
// sport_name references organization.sport(name).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@Entity
@Table(schema = "organization", name = "sports")
@Getter @Setter @NoArgsConstructor
public class Sport {
public class SportEntity {

@Id
@Column(name = "name", nullable = false)
Expand All @@ -31,5 +31,5 @@ public class Sport {
// Each Director row links this sport to a member (director role).
@OneToMany
@JoinColumn(name = "sport_name", referencedColumnName = "name", insertable = false, updatable = false)
private List<Director> directors;
private List<DirectorEntity> directors;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Entity
@Table(schema = "organization", name = "teams")
@Getter @Setter @NoArgsConstructor
public class Team {
public class TeamEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand All @@ -44,9 +44,9 @@ public class Team {

@OneToMany
@JoinColumn(name = "team_id", referencedColumnName = "id", insertable = false, updatable = false)
private List<Trainer> trainers;
private List<TrainerEntity> trainers;

@OneToMany
@JoinColumn(name = "team_id", referencedColumnName = "id", insertable = false, updatable = false)
private List<Trainee> trainees;
private List<TraineeEntity> trainees;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Entity
@Table(schema = "organization", name = "trainees")
@Getter @Setter @NoArgsConstructor @AllArgsConstructor
public class Trainee {
public class TraineeEntity {

// Composite PK: (team_id, member_id).
// team_id references organization.team(id).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Entity
@Table(schema = "organization", name = "trainers")
@Getter @Setter @NoArgsConstructor @AllArgsConstructor
public class Trainer {
public class TrainerEntity {

// Composite PK: (team_id, member_id).
// team_id references organization.team(id).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.organizationservice.entity.Director;
import tum.devoops.organizationservice.entity.DirectorEntity;

public interface DirectorRepository extends JpaRepository<Director, Director.Id> {
public interface DirectorRepository extends JpaRepository<DirectorEntity, DirectorEntity.Id> {

// SELECT * FROM organization.directors WHERE sport_name = ?
List<Director> findAllById_SportName(String sportName);
List<DirectorEntity> findAllById_SportName(String sportName);

// SELECT * FROM organization.directors WHERE member_id = ?
List<Director> findAllById_MemberId(UUID memberId);
List<DirectorEntity> findAllById_MemberId(UUID memberId);

// DELETE FROM organization.directors WHERE sport_name = ?
void deleteAllById_SportName(String sportName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.organizationservice.entity.Sport;
import tum.devoops.organizationservice.entity.SportEntity;

public interface SportRepository extends JpaRepository<Sport, String> {
public interface SportRepository extends JpaRepository<SportEntity, String> {

// SELECT s.* FROM organization.sports s
// JOIN organization.directors d ON d.sport_name = s.name
// WHERE d.member_id = ?
List<Sport> findAllByDirectors_Id_MemberId(java.util.UUID memberId);
List<SportEntity> findAllByDirectors_Id_MemberId(java.util.UUID memberId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.organizationservice.entity.Team;
import tum.devoops.organizationservice.entity.TeamEntity;

public interface TeamRepository extends JpaRepository<Team, UUID> {
public interface TeamRepository extends JpaRepository<TeamEntity, UUID> {

// SELECT * FROM organization.teams WHERE sport_name = ?
List<Team> findAllBySportName(String sportName);
List<TeamEntity> findAllBySportName(String sportName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.organizationservice.entity.Trainee;
import tum.devoops.organizationservice.entity.TraineeEntity;

public interface TraineeRepository extends JpaRepository<Trainee, Trainee.Id> {
public interface TraineeRepository extends JpaRepository<TraineeEntity, TraineeEntity.Id> {

// SELECT * FROM organization.trainees WHERE team_id = ?
List<Trainee> findAllById_TeamId(UUID teamId);
List<TraineeEntity> findAllById_TeamId(UUID teamId);

// SELECT * FROM organization.trainees WHERE member_id = ?
List<Trainee> findAllById_MemberId(UUID memberId);
List<TraineeEntity> findAllById_MemberId(UUID memberId);

// DELETE FROM organization.trainees WHERE team_id = ?
void deleteAllById_TeamId(UUID teamId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import org.springframework.data.jpa.repository.JpaRepository;

import tum.devoops.organizationservice.entity.Trainer;
import tum.devoops.organizationservice.entity.TrainerEntity;

public interface TrainerRepository extends JpaRepository<Trainer, Trainer.Id> {
public interface TrainerRepository extends JpaRepository<TrainerEntity, TrainerEntity.Id> {

// SELECT * FROM organization.trainers WHERE team_id = ?
List<Trainer> findAllById_TeamId(UUID teamId);
List<TrainerEntity> findAllById_TeamId(UUID teamId);

// SELECT * FROM organization.trainers WHERE member_id = ?
List<Trainer> findAllById_MemberId(UUID memberId);
List<TrainerEntity> findAllById_MemberId(UUID memberId);

// DELETE FROM organization.trainers WHERE team_id = ?
void deleteAllById_TeamId(UUID teamId);
Expand Down
Loading