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.util.Date;


@Entity
@Table(name = "tsm_post")
@NamedQuery(name = "TsmPost.findAll", query = "SELECT t FROM TsmPost t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = {"id"})
@ApiModel(description = "职位表")
public class TsmPost {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "主键id")
    private Long id;

    @Column(name = "name")
    @ApiModelProperty(value = "职务名称")
    private String name;

    @Column(name = "code")
    @ApiModelProperty(value = "职务编码")
    private String code;

    @Column(name = "sort")
    @ApiModelProperty(value = "职务排序")
    private Integer sort;

    @Column(name = "state")
    @ApiModelProperty(value = "职务状态(1有效,0无效)")
    private Integer state;

    @Column(name = "remark")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Column(name = "create_id")
    @ApiModelProperty(value = "创建人")
    private Long createId;

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

    @Column(name = "update_id")
    @ApiModelProperty(value = "修改人")
    private Long updateId;

    @Column(name = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @Column(name = "del_flag")
    @ApiModelProperty(value = "是否删除")
    private Boolean delFlag;

    @Column(name = "create_by")
    @ApiModelProperty(value = "创建人名称")
    private String createBy;

    @Column(name = "update_by")
    @ApiModelProperty(value = "修改人名称")
    private String updateBy;


}
