package com.rit.ems.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

@Entity
@Table(name = "ems_notes")
public class Note {
    @Id
    private Long id;

    private String title;
    
    @Column(columnDefinition = "TEXT")
    private String content;

    @Column(name = "created_at")
    private String createdAt;

    public Note() {}

    public Note(Long id, String title, String content, String createdAt) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.createdAt = createdAt;
    }

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getTitle() { return title; }
    public void setTitle(String title) { this.title = title; }

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

    public String getCreatedAt() { return createdAt; }
    public void setCreatedAt(String createdAt) { this.createdAt = createdAt; }

    @JsonProperty("created_at")
    public String getCreatedAtSnake() { return createdAt; }
    @JsonProperty("created_at")
    public void setCreatedAtSnake(String createdAt) { this.createdAt = createdAt; }
}
