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;

/**
 * @author: LG
 * @date: 2023/6/5 17:41
 */
@Entity
@Table(name = "TSM_APP_BUTTON")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"id"})

@ApiModel(description = "APP按钮权限表")
public class TsmAppButton implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @SequenceGenerator(name = "TSM_APP_BUTTON_SEQ", sequenceName = "TSM_APP_BUTTON_SEQ", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TSM_APP_BUTTON_SEQ")
    @Column(name = "btn_id")
    @ApiModelProperty(value = "主键")
    private Integer btnId;

    @Column(name = "parent_id")
    @ApiModelProperty(value = "父级ID")
    private Integer parentId;

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

    @Column(name = "code")
    @ApiModelProperty(value = "路由/编码")
    private String code;

    @Column(name = "type")
    @ApiModelProperty(value = "类型 1页面 2按钮")
    private Integer type;

    @Column(name = "state")
    @ApiModelProperty(value = "状态")
    private Integer state;

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

    @Column(name = "describe")
    @ApiModelProperty(value = "描述")
    private String describe;

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

}
