Class Category
java.lang.Object
org.codewithmagret.rest.category.Category
Represents a category that courses can belong to.
Each category can have multiple courses, but each course belongs to only one category.
This entity is used to organize courses into different categories,
making it easier for users to find and browse courses based on their interests.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the list of courses that belong to this category.getId()Gets the unique identifier of the category.getName()Gets the name of the category.voidsetCourses(List<Course> courses) Sets the list of courses that belong to this category.voidSets the unique identifier of the category.voidSets the name of the category.
-
Constructor Details
-
Category
public Category()Default constructor required by JPA. Initializes a new instance of the Category class.
-
-
Method Details
-
getId
-
setId
Sets the unique identifier of the category.- Parameters:
id- the ID to set for the category
-
getName
-
setName
Sets the name of the category.- Parameters:
name- the name to set for the category
-
getCourses
-
setCourses
-