package com.xueyi.system.emcs.domain.po;

import com.xueyi.common.core.annotation.Correlation;
import com.xueyi.common.core.annotation.Correlations;
import com.xueyi.common.core.constant.basic.OperateConstants;
import com.xueyi.common.core.web.entity.base.BaseEntity;
import com.xueyi.common.core.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serial;

import static com.xueyi.common.core.constant.basic.EntityConstants.*;
import static com.xueyi.system.api.exception.domain.merge.MergeGroup.LOG_DmDevice_GROUP;

/**
 * 日志文件信息记录 持久化对象
 *
 * @author xueyi
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "dm_device_log_file", excludeProperty = { STATUS, SORT, REMARK, DEL_FLAG })
public class DmDeviceLogFilePo extends BaseEntity {


    @Serial
    private static final long serialVersionUID = 1L;

    /** 日志类型(1：通用；2：主动拉起；3：崩溃重启) */
    @Excel(name = "日志类型(1：通用；2：主动拉起；3：崩溃重启)")
    protected Integer type;

    /** 设备管理主键ID */
    /** 模块Id */
    @NotNull(message = "模块Id不能为空")
    @Correlations({
            @Correlation(groupName = LOG_DmDevice_GROUP, keyType = OperateConstants.SubKeyType.MAIN)
    })
    protected Long manDeviceId;

    /** url地址 */
    @Excel(name = "url地址")
    protected String url;

    /** 所属组织ID */
    @Excel(name = "所属组织ID")
    protected Long deptId;

    /** 文件大小 */
    @Excel(name = "文件大小")
    protected Long fileSize;

}