package com.muyu.domain.req;

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.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author：yan
 * @Package：com.muyu.car.domain.req
 * @Project：plues
 * @name：CarFenceAdd
 * @Date：2024/9/23 23:57
 */
/**
 * 围栏添加实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "car_fence_add", autoResultMap = true)
@Tag(name = "围栏添加")
public class CarFenceAdd {

    /**
     * 围栏主键
     */
    @TableId(value = "id",type = IdType.AUTO)
    @Schema(title = "围栏主键")
    private Integer id;
    /**
     * 围栏名称
     */
    @Schema(name = "围栏名称")
    private String name;
    /**
     * 业务类型ID
     */
    @Schema(name = "业务类型ID")
    private Integer clazzId;
    /**
     * 业务类型名称
     */
    @Schema(name = "业务类型名称")
    @TableField(exist = false)
    private String clazzName;
    /**
     * 围栏类型ID
     */
    @Schema(name = "围栏类型ID")
    private Integer typeId;
    /**
     * 围栏类型名称
     */
    @Schema(name = "围栏类型名称")
    @TableField(exist = false)
    private String typeName;
    /**
     * 围栏经纬度
     */
    @Schema(name = "围栏经纬度")
    private String fenceText;
    /**
     * 围栏开始时间
     */
    @DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date fenceStart;
    /**
     * 围栏结束时间
     */
    @DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date fenceEnd;
    /**
     * 创建时间
     */
    @DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date fenceCreate;
    /**
     * 中间表ID
     */
    @Schema(name = "中间表ID")
    private Integer middleId;
}
