package com.muyu.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 电子围栏组类
 * @Author：yang
 * @Package：com.muyu.domain
 * @Project：cloud-server-8
 * @name：carFenceGroup
 * @Date：2024/9/22 10:20
 */
//weilabzu
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Tag(name = "电子围栏组类")
@TableName(value = "car_fence_group",autoResultMap = true)
public class CarFenceGroup {

    /**
     * 围栏组ID
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    /**
     * 优先级
     */
    private Integer priority;
    /**
     * 启动状态
     */
    private String status;
    /**
     * 围栏组类型
     */
    private String groupType;

    public static CarFenceGroup carFenceBuild(CarFenceGroup carFenceGroup) {
        return CarFenceGroup.builder()
                .id(carFenceGroup.getId())
                .priority(carFenceGroup.getPriority())
                .status(carFenceGroup.getStatus())
                .groupType(carFenceGroup.getGroupType())
                .build();
    }
}
