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;

/**
 * @author gongsongtao
 * @date 2023/9/18 16:19
 */
@Entity
@Table(name = "tsm_worker_menu_visit")
@NamedQuery(name = "TsmWorkerMenuVisit.findAll", query="SELECT t FROM TsmWorkerMenuVisit t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"id"})
@ApiModel(description = "菜单访问记录表")
public class TsmWorkerMenuVisit {
    @Id
    @GeneratedValue(strategy =GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "id")
    private int id;

    @Column(name = "login_id")
    @ApiModelProperty(value = "工号id")
    private Integer loginId;

    @Column(name = "menu_code")
    @ApiModelProperty(value = " 菜单编码")
    private String menuCode;

    @Column(name = "scope")
    @ApiModelProperty(value = "作用域")
    private String scope;

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


    @ApiModelProperty(value = "菜单模块")
    @Column(name = "menu_module")
    private String menuModule;

    @ApiModelProperty(name = "访问唯一标识",notes = "")
    @Column(name = "visitor_code")
    private String visitorCode ;

    @ApiModelProperty(name = "url",notes = "")
    @Column(name = "url")
    private String url;
}
