-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat/#136-fake-lottery
- Loading branch information
Showing
8 changed files
with
76 additions
and
6 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
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
32 changes: 32 additions & 0 deletions
32
Server/src/main/java/JGS/CasperEvent/domain/event/entity/participants/LotteryWinners.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,32 @@ | ||
package JGS.CasperEvent.domain.event.entity.participants; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
public class LotteryWinners { | ||
@Id | ||
private long id; | ||
private String phoneNumber; | ||
private int linkClickedCount; | ||
private int expectation; | ||
private int appliedCount; | ||
private LocalDateTime createdAt; | ||
private LocalDateTime updatedAt; | ||
|
||
public LotteryWinners(LotteryParticipants lotteryParticipants) { | ||
this.id = lotteryParticipants.getId(); | ||
this.phoneNumber = lotteryParticipants.getBaseUser().getId(); | ||
this.linkClickedCount = lotteryParticipants.getLinkClickedCount(); | ||
this.expectation = lotteryParticipants.getExpectations(); | ||
this.appliedCount = lotteryParticipants.getAppliedCount(); | ||
this.createdAt = lotteryParticipants.getCreatedAt(); | ||
this.updatedAt = lotteryParticipants.getUpdatedAt(); | ||
} | ||
|
||
public LotteryWinners() { | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...S/CasperEvent/domain/event/repository/participantsRepository/LotteryWinnerRepository.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,9 @@ | ||
package JGS.CasperEvent.domain.event.repository.participantsRepository; | ||
|
||
import JGS.CasperEvent.domain.event.entity.participants.LotteryWinners; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface LotteryWinnerRepository extends JpaRepository<LotteryWinners, Long> { | ||
} |
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