| package com.example.myproject.entity; |
| |
| import javax.persistence.*; |
| |
| @Entity |
| @Table(name = "tasks") |
| public class Task { |
| |
| @Id |
| @Column(name = "task_id") |
| private String taskId; |
| |
| @Column(name = "title", nullable = false) |
| private String title; |
| |
| @Column(name = "description", nullable = false) |
| private String description; |
| |
| @Column(name = "reward_experience", nullable = false) |
| private int rewardExperience; // 任务奖励的经验 |
| |
| @Column(name = "reward_points", nullable = false) |
| private int rewardPoints; // 任务奖励的积分 |
| |
| |
| public String getTaskId() { |
| return taskId; |
| } |
| |
| public void setTaskId(String taskId) { |
| this.taskId = taskId; |
| } |
| |
| public String getTitle() { |
| return title; |
| } |
| |
| public void setTitle(String title) { |
| this.title = title; |
| } |
| |
| public String getDescription() { |
| return description; |
| } |
| |
| public void setDescription(String description) { |
| this.description = description; |
| } |
| |
| |
| public int getRewardExperience() { |
| return rewardExperience; |
| } |
| |
| public void setRewardExperience(int rewardExperience) { |
| this.rewardExperience = rewardExperience; |
| } |
| |
| public int getRewardPoints() { |
| return rewardPoints; |
| } |
| |
| public void setRewardPoints(int rewardPoints) { |
| this.rewardPoints = rewardPoints; |
| } |
| } |