-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Sunbird-Serve/release-need-2.1.0.1
Skill Details GET API
- Loading branch information
Showing
4 changed files
with
96 additions
and
1 deletion.
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
14 changes: 14 additions & 0 deletions
14
src/main/java/com/sunbird/serve/need/NeedService/repositories/SkillDetailsRepository.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,14 @@ | ||
package com.sunbird.serve.need; | ||
|
||
import com.sunbird.serve.need.models.Need.SkillDetails; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import java.util.UUID; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.PageRequest; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
public interface SkillDetailsRepository extends JpaRepository<SkillDetails, UUID> { | ||
|
||
Page<SkillDetails> findAllByNeedTypeId(String needTypeId, Pageable pageable ); | ||
|
||
} |
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
37 changes: 37 additions & 0 deletions
37
src/main/java/com/sunbird/serve/need/models/Need/SkillDetails.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,37 @@ | ||
package com.sunbird.serve.need.models.Need; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.CreationTimestamp; | ||
import org.hibernate.annotations.UpdateTimestamp; | ||
|
||
import java.time.Instant; | ||
import java.util.UUID; | ||
|
||
@Builder | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Entity | ||
public class SkillDetails { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.UUID) | ||
private UUID id; | ||
|
||
private String needTypeId; | ||
private String skillName; | ||
private String skillLevel; | ||
|
||
@CreationTimestamp | ||
private Instant createdAt; | ||
|
||
@UpdateTimestamp | ||
private Instant updatedAt; | ||
} |