package com.zhaohaoting.framework.abs.entity;

import com.google.gson.annotations.SerializedName;

import java.text.SimpleDateFormat;
import java.util.Locale;


/**
 * author：Created by ZHT on 2017/11/13 14:10
 * email：526309416@qq.com
 * desc：首页通知
 */
public class Notify extends ItemModel {

    @SerializedName("id")
    private long notifyId;

    private String title;

    private String content;

    private String subContent;

    private long createTime;
    private long nowTime;



    public long getNotifyId() {
        return notifyId;
    }

    public void setNotifyId(long notifyId) {
        this.notifyId = notifyId;
    }

    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 getSubContent() {
        return subContent;
    }

    public void setSubContent(String subContent) {
        this.subContent = subContent;
    }

    public String getCreateTime() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA).format(createTime);
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getNowTime() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.CHINA).format(nowTime);
    }

    public void setNowTime(long nowTime) {
        this.nowTime = nowTime;
    }

    @Override
    public String getPrimaryKey() {
        return "notifyId";
    }

    @Override
    public String getPrimaryValue() {
        return String.valueOf(notifyId);
    }
}
