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-electronic
 * @name：Type
 * @Date：2024/9/17 16:40
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Tag(name = "电子围栏类型")
@TableName(value = "car_fence_type",autoResultMap = true)
public class CarFenceType {
    /**
     * 围栏类型ID
     */
    @TableId(value = "type_id",type = IdType.AUTO)
    private Integer typeId;
    /**
     * 围栏类型名称
     */
    private String typeName;

    public static CarFenceType carFenceTypeBuild(CarFenceType carFenceType) {
        return CarFenceType.builder()
                .typeId(carFenceType.getTypeId())
                .typeName(carFenceType.getTypeName())
                .build();
    }
}
