package com.bupt.note.Model; import javax.persistence.*; @Entity @Table(name = "sys_file") public class File { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long Id; @Column(nullable = false) private Long ownerId; @Column(nullable = false) private String fileName; public File() { super(); } public File(Long ownerId, String fileName) { this.ownerId = ownerId; this.fileName = fileName; } @GeneratedValue(strategy = GenerationType.IDENTITY) public Long getId() { return Id; } public void setId(Long id) { Id = id; } public Long getOwnerId() { return ownerId; } public void setOwnerId(Long ownerId) { this.ownerId = ownerId; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } }