Skip to content

Add enums for role (employee), category and genre.#9

Merged
eraiicphu merged 3 commits intomainfrom
8-create-enum-for-employee-category-and-genre
Mar 29, 2026
Merged

Add enums for role (employee), category and genre.#9
eraiicphu merged 3 commits intomainfrom
8-create-enum-for-employee-category-and-genre

Conversation

@AnnaZiafar
Copy link
Copy Markdown
Contributor

@AnnaZiafar AnnaZiafar commented Mar 28, 2026

Add String displayName for genre and category in order to be able to write out the info in correct format (all is not caps-lock)

Summary by CodeRabbit

  • New Features
    • Added content type categories: Film and Series.
    • Added eight content genres for improved organization and filtering: Action, Comedy, Crime, Drama, Fantasy, Horror, Romance, Sci‑Fi.
    • Added role types for platform workflows: Producer, Director, Recruiter, Editor.

Add String displayName fpr genre and category in order to be able to write out the info in correct format (all is not caps-lock)
@AnnaZiafar AnnaZiafar linked an issue Mar 28, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Warning

Rate limit exceeded

@AnnaZiafar has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 51 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 10 minutes and 51 seconds.

⌛ 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 for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5b5e07c8-23ed-4833-a347-1bdabc6582f1

📥 Commits

Reviewing files that changed from the base of the PR and between 1b41d07 and 55e6a64.

📒 Files selected for processing (2)
  • src/main/java/demo/codeexample/enums/Category.java
  • src/main/java/demo/codeexample/enums/Genre.java
📝 Walkthrough

Walkthrough

Three new enums were added in demo.codeexample.enums: Category (FILM, SERIES) and Genre (eight genre constants) include display-name fields and toString(); Role (PRODUCER, DIRECTOR, RECRUITER, EDITOR) is a simple constants enum.

Changes

Cohort / File(s) Summary
Enum Definitions
src/main/java/demo/codeexample/enums/Category.java, src/main/java/demo/codeexample/enums/Genre.java, src/main/java/demo/codeexample/enums/Role.java
Added three enums. CategoryFILM("Film"), SERIES("Series") with Lombok-generated all-args constructor and getter, overrides toString() to return displayName. Genre — eight constants (ACTION, COMEDY, CRIME, DRAMA, FANTASY, HORROR, ROMANCE, SCI_FI) with private final String displayName, Lombok getter/all-args constructor, and toString() override. Role — four simple constants: PRODUCER, DIRECTOR, RECRUITER, EDITOR.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I nibble keys and hop on strings,

New enums sprout little fluffs of things,
Categories, Genres, Roles in line,
My ears twitch at each tidy sign,
Hooray for enums — neat and fine!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: adding three new enums (Role, Category, and Genre) to the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 8-create-enum-for-employee-category-and-genre

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/main/java/demo/codeexample/enums/Role.java`:
- Around line 3-8: Role enum is inconsistent with Category and Genre; add a
private final String displayName field, a constructor that takes displayName,
and a public String getDisplayName() (if used elsewhere) and override toString()
to return displayName in the Role enum so its serialization and display match
Category and Genre; update each enum constant (e.g., PRODUCER, DIRECTOR,
RECRUITER, EDITOR) to pass the properly formatted display name ("Producer",
"Director", "Recruiter", "Editor") to the constructor.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9ebbd203-f14d-4a78-a079-5bcc4bd8e333

📥 Commits

Reviewing files that changed from the base of the PR and between 1120db3 and 31cf9d8.

📒 Files selected for processing (3)
  • src/main/java/demo/codeexample/enums/Category.java
  • src/main/java/demo/codeexample/enums/Genre.java
  • src/main/java/demo/codeexample/enums/Role.java

@eraiicphu eraiicphu merged commit ef58115 into main Mar 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create enum for employee, category and genre

2 participants