package com.project.whatsappchatbot.DTO;

import com.project.whatsappchatbot.model.Mechanic;
import lombok.Data;

import java.sql.Timestamp;
import java.time.LocalDateTime;

@Data
public class MechanicDTOD {
    private Long id;
    private String name;
    private String phone;
    private String state;
    private String city;
    private String address;
    private String experience;
    private String coverageArea;
    private String provideHomeService;
    private Timestamp createdAt;
    private Timestamp updatedAt;
    private String speciality;
    private String jobAssignedCount;

    // Constructor, getters, and setters
    public MechanicDTOD(Mechanic mechanic) {
        this.id = mechanic.getId();
        this.name = mechanic.getName();
        this.phone = mechanic.getPhone();
        this.state = mechanic.getState();
        this.city = mechanic.getCity();
        this.address = mechanic.getAddress();
        this.experience = mechanic.getExperience();
        this.coverageArea = mechanic.getCoverageArea();
        this.provideHomeService = mechanic.getProvideHomeService().equals("1") ? "Yes" : "No";
        this.createdAt = mechanic.getCreatedAt();
        this.updatedAt = mechanic.getUpdatedAt();
        this.speciality = mechanic.getSpeciality();
        this.jobAssignedCount = mechanic.getJobAssignedCount();
    }

}