Skip to content
Snippets Groups Projects
Commit 9d345994 authored by Richard Githuba's avatar Richard Githuba
Browse files

redoing the issue 35 as a separate issue

parent 5dc7c327
Branches
No related tags found
No related merge requests found
...@@ -32,6 +32,8 @@ dependencies { ...@@ -32,6 +32,8 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'mysql:mysql-connector-java'
} }
tasks.named('test') { tasks.named('test') {
......
package polish_community_group_11.polish_community.Categories;
import jakarta.persistence.*;
@Entity
@Table(name = "categories")
public class Categories {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int categoryId;
@Column(nullable = false, length = 100)
private String categoryTitle;
@Column(nullable = false, length = 255)
private String categoryDescription;
@Column(nullable = false)
private int userId;
// Getters and Setters
public int getCategoryId() {
return categoryId;
}
public void setCategoryId(int categoryId) {
this.categoryId = categoryId;
}
public String getCategoryTitle() {
return categoryTitle;
}
public void setCategoryTitle(String categoryTitle) {
this.categoryTitle = categoryTitle;
}
public String getCategoryDescription() {
return categoryDescription;
}
public void setCategoryDescription(String categoryDescription) {
this.categoryDescription = categoryDescription;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment