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

	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name = "tsm_url_url_id_seq", sequenceName = "tsm_url_url_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tsm_url_url_id_seq")
	@Column(name = "url_id")
	@ApiModelProperty(value = "urlId")
	private int urlId;

	@Column(name = "url_path")
	@ApiModelProperty(value = "url 路径")
	private String urlPath;

	@Column(name = "url_type")
	@ApiModelProperty(value = "1 普通url 2 AntPath")
	private int urlType;

	@Column(name = "url_name")
	@ApiModelProperty(value = "url名称功能")
	private String urlName;

	@Column(name = "url_desc")
	@ApiModelProperty(value = "url描述")
	private String urlDesc;

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

	@Column(name = "log_flag")
	@ApiModelProperty(value = "操作日志标志：0 不需要记录操作日志，1需要记录操作日志")
	private int logFlag;

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

	@Column(name = "request_type")
	@ApiModelProperty(value = "请求类型 0get 1post ...")
	private Integer  requestType;

}
