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_property")
@NamedQuery(name = "TsmProperty.findAll", query="SELECT t FROM TsmProperty t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"propId"})
@ApiModel(description = "属性表")
public class TsmProperty  implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name = "tsm_property_prop_id_seq", sequenceName = "tsm_property_prop_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tsm_property_prop_id_seq")
	@Column(name = "prop_id")
	@ApiModelProperty(value = "id")
	private int propId;

	@Column(name = "prop_code")
	@ApiModelProperty(value = "属性编码")
	private String propCode;

	@Column(name = "prop_name")
	@ApiModelProperty(value = "属性名称")
	private String propName;

	@Column(name = "prop_desc")
	@ApiModelProperty(value = "属性描述")
	private String propDesc;

	@Column(name = "prop_control")
	@ApiModelProperty(value = "控制字段")
	private String propControl;

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

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

	@Column(name = "worker_manage_state")
	@ApiModelProperty(value = "0 无效，1有效")
	private Integer workerManageState;

}
