package com.infinite.focus.server.fcm.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

@Entity
public class PushNotification {

	// PK
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private long push_notification_id;
	private String title;
	private String message;
	
	@Enumerated(EnumType.STRING)
	@Column(name="screen_type", columnDefinition = "enum('NOTIFICATION','SOCIO_EMOTIONAL_TEST') default 'NOTIFICATION'")
	private ScreenType screen_type = ScreenType.NOTIFICATION;
	private String topic;
	private String token;

	@Column(name = "created_at", nullable = false)
	@CreationTimestamp
	public Date createdAt;
	
	@Column(name = "updated_at")
	@UpdateTimestamp
	public Date updatedAt;
	
	public PushNotification() {
	}

	public long getPush_notification_id() {
		return push_notification_id;
	}

	public void setPush_notification_id(long push_notification_id) {
		this.push_notification_id = push_notification_id;
	}
	
	public String getTitle() {
		return title;
	}

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

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public ScreenType getScreen_type() {
		return screen_type;
	}

	public void setScreen_type(ScreenType screen_type) {
		this.screen_type = screen_type;
	}

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}
	
	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}
	
	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdateAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

}
