9oormthon-univ / 2024_DANPOONG_TEAM_42_BE

단풍톤 42팀 백엔드 repo
2 stars 0 forks source link

[FEAT] 엔티티 및 연관관계, Repository 구현 #5

Closed ryuwon2407 closed 2 days ago

ryuwon2407 commented 2 days ago

📌 이슈 번호

2

💬 리뷰 포인트

설계된 ERD를 바탕으로 엔티티 구현

🚀 상세 설명

설계된 ERD를 바탕으로 엔티티를 구현하였습니다. 총 14개의 테이블 모두 생성 완료 하였고 연관 관계들도 각 테이븖에 맞게 구현해두었습니다..!

현재 CascadeType은 .PERSIST로 더미 데이터 삭제를 우려하여 우선은 해당 타입으로 구현해 두었으며 실제 서버 구동하게 된다면 각 엔티티 상황에 맞게 변경해두도록 하겠습니다!!

빠트린 부분이 있는지 잘 검토해주시면 감사하겠습니다아

📸 스크린샷

image

📢 노트

Summary by CodeRabbit

Release Notes

coderabbitai[bot] commented 1 day ago

[!CAUTION]

Review failed

The pull request is closed.

Walkthrough

This pull request introduces multiple new Java classes and repositories related to payment and user management, alongside a new configuration file. Key additions include the Pay, PayChargelist, Paylist, Card, Cardlist, MyPiece, Piece, Reviews, Store, and Wishlist entities, each with defined fields and relationships. New repository interfaces for these entities are also created to facilitate CRUD operations. Additionally, the configuration file application.yml is added to replace the deleted application.properties, setting up database and Redis properties for a production environment.

Changes

File Path Change Summary
src/main/java/com/groom/swipo/domain/payment/entity/Pay.java Class Pay added with fields id, totalMoney, user, paylists, and constructors.
src/main/java/com/groom/swipo/domain/payment/entity/PayChargelist.java Class PayChargelist added with fields id, name, price, impUid, merchantUid, user, and constructor.
src/main/java/com/groom/swipo/domain/payment/entity/Paylist.java Class Paylist added with fields id, value, pay, store, and constructor.
src/main/java/com/groom/swipo/domain/payment/repository/PayChargelistRepository.java Interface PayChargelistRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/payment/repository/PayRepository.java Interface PayRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/payment/repository/PaylistRepository.java Interface PaylistRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/point/entity/Card.java Class Card added with fields id, number, contents, totalPoint, customeImage, user, cardlists, and constructor.
src/main/java/com/groom/swipo/domain/point/entity/Cardlist.java Class Cardlist added with fields id, value, card, store, and constructor.
src/main/java/com/groom/swipo/domain/point/entity/MyPiece.java Class MyPiece added with fields id, isDeleted, user, piece, store, and constructor.
src/main/java/com/groom/swipo/domain/point/entity/Piece.java Class Piece added with fields id, name, myPieces, and constructor.
src/main/java/com/groom/swipo/domain/point/repository/CardRepository.java Interface CardRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/point/repository/CardlistRepository.java Interface CardlistRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/point/repository/MyPieceRepository.java Interface MyPieceRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/point/repository/PieceRepository.java Interface PieceRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/store/entity/Reviews.java Class Reviews added with fields id, star, user, store, and constructor.
src/main/java/com/groom/swipo/domain/store/entity/Store.java Class Store added with multiple fields and relationships, and a constructor.
src/main/java/com/groom/swipo/domain/store/entity/StoreImage.java Class StoreImage added with fields id, url, store, and constructor.
src/main/java/com/groom/swipo/domain/store/entity/Wishlist.java Class Wishlist added with fields id, user, store, and constructor.
src/main/java/com/groom/swipo/domain/store/entity/enums/StoreType.java Enum StoreType added with constants NORMAL, PREMIUM.
src/main/java/com/groom/swipo/domain/store/repository/ReviewsRepository.java Interface ReviewsRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/store/repository/StoreImageRepository.java Interface StoreImageRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/store/repository/StoreRepository.java Interface StoreRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/store/repository/WishilistRepository.java Interface WishilistRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/user/entity/User.java Class User added with multiple fields and relationships, and a constructor.
src/main/java/com/groom/swipo/domain/user/entity/VerificationCode.java Class VerificationCode added with fields id, code, expirationTimeInMinutes, methods for expiration checking.
src/main/java/com/groom/swipo/domain/user/entity/enums/Provider.java Enum Provider added with constants KAKAO, APPLE.
src/main/java/com/groom/swipo/domain/user/entity/enums/Telecom.java Enum Telecom added with constants SKT, KT, LGU, OTHER.
src/main/java/com/groom/swipo/domain/user/repository/UserRepository.java Interface UserRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/domain/user/repository/VerificationCodeRepository.java Interface VerificationCodeRepository added, extending JpaRepository.
src/main/java/com/groom/swipo/global/common/enums/Area.java Enum Area added with constants for various geographical areas.
src/main/java/com/groom/swipo/global/entity/BaseEntity.java Method getCreatedAt() added to BaseEntity class.
src/main/resources/application.properties File deleted.
src/main/resources/application.yml New configuration file added with production settings for datasource and Redis properties.

Poem

🐰 In the land of code where bunnies play,
New classes hop in, brightening the day!
Repositories sprout like flowers in spring,
With entities dancing, oh what joy they bring!
A YAML file sings, as properties align,
Hooray for the changes, all perfectly fine! 🌼

[!WARNING]

Rate limit exceeded

@kduoh99 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue? After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.
🚦 How do rate limits work? CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information.
📥 Commits Reviewing files that changed from the base of the PR and between 09b78f36210a8450279edff79d161878020aca72 and fed06bc4897f1f900ae2c741cfd0d16f1cf093b6.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.