diff --git a/src/main/java/com/codesdream/ase/model/parent/Parent.java b/src/main/java/com/codesdream/ase/model/parent/Parent.java index 4a1c72f..7fb7617 100644 --- a/src/main/java/com/codesdream/ase/model/parent/Parent.java +++ b/src/main/java/com/codesdream/ase/model/parent/Parent.java @@ -1,12 +1,16 @@ package com.codesdream.ase.model.parent; +import com.codesdream.ase.model.mark.Tag; import com.codesdream.ase.model.permission.User; import lombok.Data; import lombok.EqualsAndHashCode; -import javax.persistence.Entity; +import javax.annotation.Generated; +import javax.persistence.*; +import java.util.List; @Entity +@Table @Data @EqualsAndHashCode(callSuper = false) public class Parent extends User { diff --git a/src/main/java/com/codesdream/ase/repository/parent/ParentRepository.java b/src/main/java/com/codesdream/ase/repository/parent/ParentRepository.java new file mode 100644 index 0000000..4560a04 --- /dev/null +++ b/src/main/java/com/codesdream/ase/repository/parent/ParentRepository.java @@ -0,0 +1,17 @@ +package com.codesdream.ase.repository.parent; + +import com.codesdream.ase.model.parent.Parent; +import com.codesdream.ase.model.student.Student; +import org.springframework.data.domain.Sort; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Optional; + +@Repository +public interface ParentRepository extends JpaRepository { + List findByStudentId(String studentId); + List findByStudentId(String studentId, Sort sort); + +} diff --git a/src/main/java/com/codesdream/ase/repository/robot/FaqRepository.java b/src/main/java/com/codesdream/ase/repository/robot/FaqRepository.java new file mode 100644 index 0000000..0c2912f --- /dev/null +++ b/src/main/java/com/codesdream/ase/repository/robot/FaqRepository.java @@ -0,0 +1,17 @@ +package com.codesdream.ase.repository.robot; + + +import com.codesdream.ase.model.robot.Faq; +import com.codesdream.ase.model.student.Honor; +import org.springframework.data.domain.Sort; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface FaqRepository extends JpaRepository { + + Faq findByAnswer(String answer); + Faq findByAnswer(String answer, Sort sort); +} diff --git a/src/main/java/com/codesdream/ase/repository/student/StudentRepository.java b/src/main/java/com/codesdream/ase/repository/student/StudentRepository.java index 69d1b69..bcc9863 100644 --- a/src/main/java/com/codesdream/ase/repository/student/StudentRepository.java +++ b/src/main/java/com/codesdream/ase/repository/student/StudentRepository.java @@ -1,6 +1,7 @@ package com.codesdream.ase.repository.student; import com.codesdream.ase.model.student.Student; +import com.codesdream.ase.model.student.StudentCourse; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @@ -11,4 +12,7 @@ import java.util.Optional; @Repository public interface StudentRepository extends JpaRepository { + Student findByParentId(String parentId); + Student findByParentId(String parentId, Sort sort); + }