package com.njcn.cssystem.pojo.po;

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

import java.time.LocalDateTime;

/**
 * 
 * Description:
 * Date: 2023/8/7  14:02【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@Data
@TableName(value = "cs_logs")
public class CsLogsPO {
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;


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

    /**
     * 操作
     */
    @TableField(value = "operate")
    private String operate;

    /**
     * 结果(0:失败 1:成功)
     */
    @TableField(value = "`result`")
    private Integer result;

    /**
     * 失败原因
     */
    @TableField(value = "fail_reason")
    private String failReason;

    /**
     * 登录名称
     */
    @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;

    public static final String COL_ID = "id";

    public static final String COL_USER_NAME = "user_name";

    public static final String COL_OPERATE = "operate";

    public static final String COL_RESULT = "result";

    public static final String COL_FAIL_REASON = "fail_reason";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_LOGIN_NAME = "login_name";
}