UserNote.java 1.28 KB
package fi.insomnia.bortal.model;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "user_notes")
public class UserNote extends GenericEntity {

    private static final long serialVersionUID = 6128095532481826770L;

    @ManyToOne
    @JoinColumn(nullable = false)
    private User user;

    @ManyToOne
    @JoinColumn(nullable = false)
    private LanEvent event;

    @Lob
    private String content;

    @Lob
    @JoinColumn(nullable = false)
    @Enumerated(EnumType.STRING)
    private UserNoteType notetype;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public LanEvent getEvent() {
        return event;
    }

    public void setEvent(LanEvent event) {
        this.event = event;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public UserNoteType getNotetype() {
        return notetype;
    }

    public void setNotetype(UserNoteType notetype) {
        this.notetype = notetype;
    }

}