package com.storlead.system.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统应用（sys_app），与 menu.app_id 对应。
 */
@Data
@Accessors(chain = true)
@TableName("sys_app")
@ApiModel(value = "SysAppEntity", description = "系统应用")
public class SysAppEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键，对应 menu.app_id")
    private Long id;

    @ApiModelProperty(value = "应用编码，全局唯一")
    private Long appCode;

    @ApiModelProperty(value = "应用名称")
    private String appName;

    @ApiModelProperty(value = "前台标题")
    private String appTitle;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "域名/端口")
    private String domainName;

    @ApiModelProperty(value = "默认首页路由/入口")
    private String homePath;

    @ApiModelProperty(value = "创建者")
    private Long createBy;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新者")
    private Long updateBy;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "是否启用：1 启用，0 禁用")
    private Integer enabled;

    @ApiModelProperty(value = "是否删除：1 已删除，0 未删除")
    private Integer isDelete;

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

    @ApiModelProperty(value = "拥有者")
    private Long ownerBy;
}
