22301138 | 1c35910 | 2025-06-03 15:19:59 +0800 | [diff] [blame^] | 1 | package com.example.myproject.entity; |
| 2 | |
| 3 | import javax.persistence.*; |
| 4 | |
| 5 | @Entity |
| 6 | @Table(name = "tasks") |
| 7 | public class Task { |
| 8 | |
| 9 | @Id |
| 10 | @Column(name = "task_id") |
| 11 | private String taskId; |
| 12 | |
| 13 | @Column(name = "title", nullable = false) |
| 14 | private String title; |
| 15 | |
| 16 | @Column(name = "description", nullable = false) |
| 17 | private String description; |
| 18 | |
| 19 | @Column(name = "reward_experience", nullable = false) |
| 20 | private int rewardExperience; // 任务奖励的经验 |
| 21 | |
| 22 | @Column(name = "reward_points", nullable = false) |
| 23 | private int rewardPoints; // 任务奖励的积分 |
| 24 | |
| 25 | |
| 26 | public String getTaskId() { |
| 27 | return taskId; |
| 28 | } |
| 29 | |
| 30 | public void setTaskId(String taskId) { |
| 31 | this.taskId = taskId; |
| 32 | } |
| 33 | |
| 34 | public String getTitle() { |
| 35 | return title; |
| 36 | } |
| 37 | |
| 38 | public void setTitle(String title) { |
| 39 | this.title = title; |
| 40 | } |
| 41 | |
| 42 | public String getDescription() { |
| 43 | return description; |
| 44 | } |
| 45 | |
| 46 | public void setDescription(String description) { |
| 47 | this.description = description; |
| 48 | } |
| 49 | |
| 50 | |
| 51 | public int getRewardExperience() { |
| 52 | return rewardExperience; |
| 53 | } |
| 54 | |
| 55 | public void setRewardExperience(int rewardExperience) { |
| 56 | this.rewardExperience = rewardExperience; |
| 57 | } |
| 58 | |
| 59 | public int getRewardPoints() { |
| 60 | return rewardPoints; |
| 61 | } |
| 62 | |
| 63 | public void setRewardPoints(int rewardPoints) { |
| 64 | this.rewardPoints = rewardPoints; |
| 65 | } |
| 66 | } |