package com.zsc.edu.gateway.domain.iot;


import com.baomidou.mybatisplus.annotation.TableField;
import com.zsc.edu.gateway.modules.iot.tsl.entity.Event;
import com.zsc.edu.gateway.modules.iot.tsl.entity.Param;

import java.util.List;

public class EventBuilder extends BaseParamBuilder {
    private Long productId;
    private Event.Type type;
    private String name;
    private String identifier;

    public static EventBuilder builder() {
        return new EventBuilder();
    }

    public EventBuilder setProductId(Long productId) {
        this.productId = productId;
        return this;
    }

    public EventBuilder setType(Event.Type type) {
        this.type = type;
        return this;
    }

    public EventBuilder setName(String name) {
        this.name = name;
        return this;
    }

    public EventBuilder setIdentifier(String identifier) {
        this.identifier = identifier;
        return this;
    }

    public Event build() {
        Event event = new Event();
        event.setName(name);
        event.setIdentifier(identifier);
        event.setProductId(productId);
        event.setType(type);
        return event;
    }
}
