package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Data;

import java.util.Date;
import java.util.Objects;

/**
 * @author chan
 * @date 2024/4/8 17:02
 */
@Data
@SearchBean(
        tables = "claude_session cs"
)
public class ClaudeCarInfoView {

    /**
     * 车次id
     */
    @DbField("cs.carId")
    private String carId;

    /**
     * 车次名称
     */
    @DbField("cs.car_name")
    private String carName;

    @DbField("cs.status")
    private Boolean csStatus;

    /**
     * 车次状态 繁忙 空闲 停运
     */
    @DbIgnore
    private String status;


    /**
     * 得分
     */
    @DbField("cs.score")
    private Double score;

    /**
     * 可用时间
     */
    @DbIgnore
    private Date expTime;

    /**
     * 使用次数
     */
    @DbIgnore
    private Integer use;


    @DbField("cs.isPlus")
    private Integer isPlus;

    @DbField("cs.sort")
    private Integer sort;

    @DbField("clears_in")
    private Long clearsIn;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ClaudeCarInfoView that = (ClaudeCarInfoView) o;
        return Objects.equals(carId, that.carId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(carId);
    }
}
