package com.izouma.dingdong.domain.rider;

import com.izouma.dingdong.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.math.BigDecimal;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Where(clause = "enabled = 1")
@ApiModel(value = "骑手", description = "骑手")
public class Rider extends BaseEntity {
    @ApiModelProperty(value = "用户ID", name = "userId")
    private Long userId;

    @ApiModelProperty(value = "工号", name = "jobNumber")
    private Long jobNumber;

    @ApiModelProperty(value = "区域",name = "area")
    private String area;

    @ApiModelProperty(value = "签到", name = "signIn")
    private Boolean signIn;

    @ApiModelProperty(value = "经验值", name = "experience")
    private String experience;

    @ApiModelProperty(value = "等级", name = "level")
    private int level;

    @ApiModelProperty(value = "货币", name = "monetary")
    private BigDecimal monetary;

    @ApiModelProperty(value = "成单数", name = "singular")
    private int singular;

    @ApiModelProperty(value = "距离", name = "distance")
    private double distance;

    @ApiModelProperty(value = "好评数", name = "goodReview")
    private int goodReview;

    @ApiModelProperty(value = "差评数", name = "badReview")
    private int badReview;

    @ApiModelProperty(value = "操作",name = "operate")
    private String operate;

    @Column(nullable = false)
    @ApiModelProperty(value = "黑名单", name = "blacklist")
    private Boolean blacklist;

    @Column(nullable = false)
    private Boolean enabled = true;

}
