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

@Entity
@Table(name = "tsm_worker_org_all")
@NamedQuery(name = "TsmWorkerOrgAll.findAll", query = "SELECT t FROM TsmWorkerOrgAll t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = { "id" })
@ApiModel(description = "用户组织权限表")
public class TsmWorkerOrgAll implements Serializable, Cloneable{
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "id")
    private Long id;

    @Column(name = "org_id")
    @ApiModelProperty(value = "组织id")
    private Long orgId;

    @Column(name = "org_code")
    @ApiModelProperty(value = "组织编码")
    private String orgCode;

    @Column(name = "worker_id")
    @ApiModelProperty(value = "用户id")
    private Long workerId;

    @Column(name = "create_user_id")
    @ApiModelProperty(value = "创建人id")
    private Long createUserId;

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

    @Column(name = "recursive_or_not")
    @ApiModelProperty(value = "是否递归：1递归2不递归")
    private Long recursiveOrNot;
}
