-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTodo.java
More file actions
50 lines (38 loc) · 892 Bytes
/
Todo.java
File metadata and controls
50 lines (38 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.example.demotodo;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Todo {
private Integer id;
private String title;
private String body;
public Todo(){
}
public Todo(Integer id, String title, String body){
this.id=id;
this.title=title;
this.body=body;
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
}