Created
March 21, 2018 05:46
-
-
Save chathurangat/21368ed5ff96c4d3569d2238b81a0796 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.persistence.*; | |
import java.util.List; | |
@Entity | |
@Table(name = "courses") | |
public class Course | |
{ | |
@Id | |
@GeneratedValue(strategy = GenerationType.AUTO) | |
private Long id; | |
private String title; | |
private String description; | |
private String major; | |
@Column(name = "created_at") | |
private String createdAt; | |
@OneToMany(mappedBy = "course") | |
private List<StudentCourseEnrollment> courseEnrollments; | |
//TODO add getters and setters for all properties | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment