package com.yimeng.okr.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yimeng.okr.enums.Grade;
import com.yimeng.okr.enums.ScoreType;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("performance_score")
public class PerformanceScore {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long periodId;
    private Long userId;
    private Long evaluatorId;
    private Double okrScore;
    private Double kpiScore;
    private Double bonus;
    private Double penalty;
    private Double total;

    @TableField("grade")
    private Grade grade;

    @TableField("type")
    private ScoreType type;

    private String status;

    private String commentsJson;

    private LocalDateTime publishedAt;

    private LocalDateTime confirmedAt;

    @TableLogic
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}
