package com.njcn.csdevice.pojo.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author caozehui
 * @data 2026-04-23
 * @description 设备升级日志
 */
@Data
@TableName(value = "cs_upgrade_logs")
public class CsUpgradeLogs {
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 设备id
     */
    @TableField(value = "dev_id")
    private String devId;

    /**
     * 版本号
     */
    @TableField(value = "version_no")
    private String versionNo;

    /**
     * 升级结果(0:失败 1:成功)
     */
    private Integer result;

    /**
     * 用户名称
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 登录名称
     */
    @TableField(value = "login_name")
    private String loginName;

    /**
     * 创建用户
     */
    @TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.IGNORED)
    private String createBy;


    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.IGNORED)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新用户
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, insertStrategy = FieldStrategy.IGNORED)
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, insertStrategy = FieldStrategy.IGNORED)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
