Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;

/**
* TODO: you're job is to implement mapping for JPA entity {@link Movie}
* - specify id
Expand All @@ -14,12 +16,19 @@
@NoArgsConstructor
@Getter
@Setter
@Entity
@Table(name = "movie")
public class Movie {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "name", nullable = false)
private String name;

@Column(name = "director", nullable = false)
private String director;

@Column(name = "duration")
private Integer durationSeconds;
}