package com.uas.platform.b2b.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 未读消息统计表
 * Created by wangmh on 2017/7/7.
 */
@Entity
@Table(name = "purc$pagingreleasecount")
public class PagingReleaseCount implements Serializable{

    /**
     * 序号
     */
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "prc_id")
    private Long id;

    /**
     * 用户UU号
     */
    @Column(name = "prc_useruu")
    private Long userUU;

    /**
     * 用户
     */
    @OneToOne(cascade = { CascadeType.REFRESH })
    @JoinColumn(name = "prc_useruu", insertable = false, updatable = false)
    private User user;

    /**
     * 企业UU号
     */
    @Column(name = "prc_enuu")
    private Long enUU;

    /**
     * 企业
     */
    @OneToOne(cascade = { CascadeType.REFRESH })
    @JoinColumn(name = "prc_enuu", insertable = false, updatable = false)
    private Enterprise enterprise;

    /**
     * 单据对应的表名（值小写）
     */
    @Column(name = "prc_table")
    private String table;

    /**
     * 单据分类（sale or purc）
     */
    @Column(name = "prc_category")
    private String category;

    /**
     * 消息数量
     */
    @Column(name = "prc_count")
    private Integer count;

    /**
     * 统计单据状态（-1为统计全部单据）
     */
    @Column(name = "prc_orderstatus")
    private Integer orderStatus;

    public Long getId() {
        return id;
    }

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

    public User getUser() {
        return user;
    }

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

    public Enterprise getEnterprise() {
        return enterprise;
    }

    public void setEnterprise(Enterprise enterprise) {
        this.enterprise = enterprise;
    }

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Long getUserUU() {
        return userUU;
    }

    public void setUserUU(Long userUU) {
        this.userUU = userUU;
    }

    public Long getEnUU() {
        return enUU;
    }

    public void setEnUU(Long enUU) {
        this.enUU = enUU;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }
}
