package com.crunii.micro.domain.entity.main;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "tsm_pub")
@NamedQuery(name = "TsmPub.findAll", query="SELECT t FROM TsmPub t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"pubId"})
@ApiModel(description = "发布表")
public class TsmPub  implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name = "tsm_pub_pub_id_seq", sequenceName = "tsm_pub_pub_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tsm_pub_pub_id_seq")
	@Column(name = "pub_id")
	@ApiModelProperty(value = "发布Id")
	private int pubId;

	@Column(name = "pub_name")
	@ApiModelProperty(value = "发布名称")
	private String pubName;

	@Column(name = "pub_type")
	@ApiModelProperty(value = "发布类型")
	private String pubType;

	@Column(name = "pub_desc")
	@ApiModelProperty(value = "发布描述")
	private String pubDesc;

	@Column(name = "pub_icon")
	@ApiModelProperty(value = "发布图标")
	private String pubIcon;

	@Column(name = "enable_time")
	@ApiModelProperty(value = "生效时间")
	private java.util.Date enableTime;

	@Column(name = "disable_time")
	@ApiModelProperty(value = "失效时间")
	private java.util.Date disableTime;

	@Column(name = "create_time")
	@ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;

	@Column(name = "sort_id")
	@ApiModelProperty(value = "排序Id")
	private int sortId;

	@Column(name = "state")
	@ApiModelProperty(value = "0:无效,1:有效")
	private int state;

}
