package com.bohuikeji.delivery.backstage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bohuikeji.frame.module.admin.annotation.TableKeyField;
import com.bohuikeji.frame.module.admin.annotation.TableNewField;
import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import com.bohuikeji.frame.module.admin.constant.RegEx;
import com.bohuikeji.frame.module.admin.entity.web.block.SelectBlock;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 客户信息表
 * </p>
 *
 * @author 10552
 * @since 2019-08-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TRentalCar对象", description="客户信息表")
@TableName("t_rental_car")
public class TRentalCar extends EntityBase<TRentalCar> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value="租车id")
    @TableId(value = "rental_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableField("rental_id")
    @TableQueryField(show = false)
    @TableNewField(show = false)
    private Integer rentalId;

    @ApiModelProperty(value = "租车人")
    @TableField("rental_name")
    @TableQueryField(show = false)
    @TableShowField(value = "租车人")
    @TableNewField
    private String rentalName;

    @ApiModelProperty(value = "用车人电话")
    @TableField("rental_phone")
    @TableShowField(value = "用车人电话")
    @TableNewField(limit = RegEx.INTEGER,edit = false,required = false)
    @TableQueryField(show = false)
    private String rentalPhone;

    @ApiModelProperty(value = "租车金额")
    @TableField("rental_price")
    @TableShowField("租车金额(￥)")
    @TableNewField(edit = false)
    private String rentalPrice="0.00";


    @ApiModelProperty(value = "租车时间")
    @TableField("rental_time")
    @TableShowField("租车时间")
    @TableQueryField(like = false,sort = 0)
    private LocalDateTime rentalTime=LocalDateTime.now();

    @ApiModelProperty(value = "还车时间")
    @TableField("end_time")
    @TableShowField("还车时间")
    @TableQueryField(like = false,sort = 0)
    private String endTime;

    @ApiModelProperty(value = "用车状态")
    @TableField("rental_status")
    @TableQueryField
    @TableShowField(value = "用车状态")
    private String rentalStatus="使用中";
}
