package com.platform2easy.genesis.web.dto;

import com.platform2easy.genesis.domain.model.Company;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class CompanyResponseDTO {
    private Long id;
    private String companyName;
    private String companyFlag;

    public static CompanyResponseDTO fromEntity(Company company) {
        if (company == null) {
            return null;
        }
        return new CompanyResponseDTO(
            company.getId(),
            company.getName(),
            company.getFlag()
        );
    }
}
