From dc0d5742f5bf18ddf321d193830f76eaf56732d5 Mon Sep 17 00:00:00 2001 From: pb8qzmito <13100778657@163.com> Date: Mon, 7 Oct 2024 12:23:25 +0800 Subject: [PATCH] ADD file via upload --- Student.java | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Student.java diff --git a/Student.java b/Student.java new file mode 100644 index 0000000..2c9338d --- /dev/null +++ b/Student.java @@ -0,0 +1,59 @@ +package com.example.classroomattendance.model; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class Student { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + private String name; + private String studentId; + private double points = 0.0; + + // Constructors, getters and setters + public Student() {} + + public Student(String name, String studentId, double points) { + this.name = name; + this.studentId = studentId; + this.points = points; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStudentId() { + return studentId; + } + + public void setStudentId(String studentId) { + this.studentId = studentId; + } + + public double getPoints() { + return points; + } + + public void setPoints(double points) { + this.points = points; + } + +} \ No newline at end of file