-
Notifications
You must be signed in to change notification settings - Fork 0
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 #23 from ADPRO-C11/subbox-management
Subbox management
- Loading branch information
Showing
11 changed files
with
102 additions
and
20 deletions.
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
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
11 changes: 0 additions & 11 deletions
11
src/main/java/id/ac/ui/cs/advprog/snackscription_subscriptionbox/model/Admin.java
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
src/main/java/id/ac/ui/cs/advprog/snackscription_subscriptionbox/model/LogAdmin.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,33 @@ | ||
package id.ac.ui.cs.advprog.snackscription_subscriptionbox.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Data | ||
@Table(name = "Log") | ||
@Entity | ||
@NoArgsConstructor | ||
public class LogAdmin { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "log_id") | ||
private int id; | ||
|
||
@Column(name = "log_string") | ||
private String logString; | ||
|
||
@Column(name = "log_sub_box") | ||
private String subBoxId; | ||
|
||
@Column | ||
private LocalDateTime date; | ||
|
||
public LogAdmin(String logString, String subBoxId) { | ||
this.logString = logString; | ||
this.subBoxId = subBoxId; | ||
this.date = LocalDateTime.now(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...ain/java/id/ac/ui/cs/advprog/snackscription_subscriptionbox/repository/LogRepository.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 id.ac.ui.cs.advprog.snackscription_subscriptionbox.repository; | ||
|
||
import id.ac.ui.cs.advprog.snackscription_subscriptionbox.model.LogAdmin; | ||
import id.ac.ui.cs.advprog.snackscription_subscriptionbox.model.SubscriptionBox; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.List; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
@Repository | ||
public interface LogRepository extends JpaRepository<LogAdmin, Integer> { | ||
CompletableFuture<List<LogAdmin>> findAllByOrderByDateDesc(); | ||
} |
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
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
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
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
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
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
spring.application.name=snackscription_subscriptionbox | ||
spring.profiles.active=${PRODUCTION:dev} | ||
management.endpoints.web.exposure.include=* |