package com.social.media.interfaces.web.dto.user;

import java.time.LocalDateTime;

/**
 * Response DTO for user information
 */
public record UserResponse(
    String id,
    String companyId,
    String name,
    String email,
    String cpf,
    String phone,
    boolean whatsappEnabled,
    String avatarUrl,
    String position,
    String department,
    LocalDateTime registrationDate,
    LocalDateTime lastAccessDate,
    String status,
    String type,
    boolean emailVerified,
    String parentUserId,
    boolean deleted,
    LocalDateTime createdAt,
    LocalDateTime updatedAt
) {
    
    public static Builder builder() {
        return new Builder();
    }
    
    public static class Builder {
        private String id;
        private String companyId;
        private String name;
        private String email;
        private String cpf;
        private String phone;
        private boolean whatsappEnabled;
        private String avatarUrl;
        private String position;
        private String department;
        private LocalDateTime registrationDate;
        private LocalDateTime lastAccessDate;
        private String status;
        private String type;
        private boolean emailVerified;
        private String parentUserId;
        private boolean deleted;
        private LocalDateTime createdAt;
        private LocalDateTime updatedAt;
        
        public Builder id(String id) {
            this.id = id;
            return this;
        }
        
        public Builder companyId(String companyId) {
            this.companyId = companyId;
            return this;
        }
        
        public Builder name(String name) {
            this.name = name;
            return this;
        }
        
        public Builder email(String email) {
            this.email = email;
            return this;
        }
        
        public Builder cpf(String cpf) {
            this.cpf = cpf;
            return this;
        }
        
        public Builder phone(String phone) {
            this.phone = phone;
            return this;
        }
        
        public Builder whatsappEnabled(boolean whatsappEnabled) {
            this.whatsappEnabled = whatsappEnabled;
            return this;
        }
        
        public Builder avatarUrl(String avatarUrl) {
            this.avatarUrl = avatarUrl;
            return this;
        }
        
        public Builder position(String position) {
            this.position = position;
            return this;
        }
        
        public Builder department(String department) {
            this.department = department;
            return this;
        }
        
        public Builder registrationDate(LocalDateTime registrationDate) {
            this.registrationDate = registrationDate;
            return this;
        }
        
        public Builder lastAccessDate(LocalDateTime lastAccessDate) {
            this.lastAccessDate = lastAccessDate;
            return this;
        }
        
        public Builder status(String status) {
            this.status = status;
            return this;
        }
        
        public Builder type(String type) {
            this.type = type;
            return this;
        }
        
        public Builder emailVerified(boolean emailVerified) {
            this.emailVerified = emailVerified;
            return this;
        }
        
        public Builder parentUserId(String parentUserId) {
            this.parentUserId = parentUserId;
            return this;
        }
        
        public Builder deleted(boolean deleted) {
            this.deleted = deleted;
            return this;
        }
        
        public Builder createdAt(LocalDateTime createdAt) {
            this.createdAt = createdAt;
            return this;
        }
        
        public Builder updatedAt(LocalDateTime updatedAt) {
            this.updatedAt = updatedAt;
            return this;
        }
        
        public UserResponse build() {
            return new UserResponse(
                id, companyId, name, email, cpf, phone, whatsappEnabled,
                avatarUrl, position, department, registrationDate, lastAccessDate,
                status, type, emailVerified, parentUserId, deleted, createdAt, updatedAt
            );
        }
    }
}
