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 org.hibernate.annotations.Where;

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

@Entity
@Table(name = "tsm_property_value")
@NamedQuery(name = "TsmPropertyValue.findAll", query="SELECT t FROM TsmPropertyValue t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"valueId"})
@ApiModel(description = "属性值表")
@Where(clause=" del_flag = 0 ")
public class TsmPropertyValue  implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name = "tsm_property_value_value_id_seq", sequenceName = "tsm_property_value_value_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tsm_property_value_value_id_seq")
	@Column(name = "value_id")
	@ApiModelProperty(value = "主键")
	private int valueId;

	@Column(name = "prop_id")
	@ApiModelProperty(value = "属性ID")
	private int propId;

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

	@Column(name = "value_code")
	@ApiModelProperty(value = "值编码")
	private String valueCode;

	@Column(name = "value_name")
	@ApiModelProperty(value = "值名称")
	private String valueName;

	@Column(name = "value_desc")
	@ApiModelProperty(value = "值描述")
	private String valueDesc;

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

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

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

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

	@Column(name = "del_flag")
	@ApiModelProperty(value = "状态 0正常|1删除")
	private Integer delFlag;
}
