package com.social.media.dto;

import jakarta.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;
import java.util.Map;

public class SocialAccountDto {
    
    private Long id;
    
    @NotNull(message = "Company ID é obrigatório")
    private Long companyId;
    
    @NotNull(message = "Social Network ID é obrigatório")
    private Long socialNetworkId;
    
    @NotBlank(message = "Username é obrigatório")
    @Size(max = 100, message = "Username deve ter no máximo 100 caracteres")
    private String username;
    
    @Size(max = 150, message = "Display name deve ter no máximo 150 caracteres")
    private String displayName;
    
    @NotBlank(message = "Account code é obrigatório")
    @Size(max = 100, message = "Account code deve ter no máximo 100 caracteres")
    private String accountCode;
    
    @Size(max = 500, message = "Profile URL deve ter no máximo 500 caracteres")
    private String profileUrl;
    
    @Size(max = 500, message = "Avatar URL deve ter no máximo 500 caracteres")
    private String avatarUrl;
    
    @Size(max = 1000, message = "Bio deve ter no máximo 1000 caracteres")
    private String bio;
    
    @Size(max = 200, message = "Location deve ter no máximo 200 caracteres")
    private String location;
    
    @Size(max = 500, message = "Website deve ter no máximo 500 caracteres")
    private String website;
    
    private String connectionStatus;
    
    private Boolean active;
    private Boolean verified;
    private Boolean isPrivate;
    
    @Size(max = 50, message = "Account type deve ter no máximo 50 caracteres")
    private String accountType;
    
    @Size(max = 100, message = "Business category deve ter no máximo 100 caracteres")
    private String businessCategory;
    
    private Long responsibleUserId;
    
    private Integer followerTarget;
    private Double engagementTarget;
    
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime registrationDate;
    
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime lastSyncDate;
    
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime nextSyncDate;
    
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime lastPostDate;
    
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime lastMetricsUpdate;
    
    @Size(max = 500, message = "Sync error deve ter no máximo 500 caracteres")
    private String lastSyncError;
    
    private Map<String, Object> metrics;
    private Map<String, Object> additionalData;
    
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime createdAt;
    
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime updatedAt;
    
    private Boolean deleted;
    
    public SocialAccountDto() {}
    
    public SocialAccountDto(Long id, String username, String displayName, String connectionStatus, Boolean active) {
        this.id = id;
        this.username = username;
        this.displayName = displayName;
        this.connectionStatus = connectionStatus;
        this.active = active;
        this.createdAt = LocalDateTime.now();
    }
    
    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    
    public Long getCompanyId() { return companyId; }
    public void setCompanyId(Long companyId) { this.companyId = companyId; }
    
    public Long getSocialNetworkId() { return socialNetworkId; }
    public void setSocialNetworkId(Long socialNetworkId) { this.socialNetworkId = socialNetworkId; }
    
    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }
    
    public String getDisplayName() { return displayName; }
    public void setDisplayName(String displayName) { this.displayName = displayName; }
    
    public String getAccountCode() { return accountCode; }
    public void setAccountCode(String accountCode) { this.accountCode = accountCode; }
    
    public String getProfileUrl() { return profileUrl; }
    public void setProfileUrl(String profileUrl) { this.profileUrl = profileUrl; }
    
    public String getAvatarUrl() { return avatarUrl; }
    public void setAvatarUrl(String avatarUrl) { this.avatarUrl = avatarUrl; }
    
    public String getBio() { return bio; }
    public void setBio(String bio) { this.bio = bio; }
    
    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }
    
    public String getWebsite() { return website; }
    public void setWebsite(String website) { this.website = website; }
    
    public String getConnectionStatus() { return connectionStatus; }
    public void setConnectionStatus(String connectionStatus) { this.connectionStatus = connectionStatus; }
    
    public Boolean getActive() { return active; }
    public void setActive(Boolean active) { this.active = active; }
    
    public Boolean getVerified() { return verified; }
    public void setVerified(Boolean verified) { this.verified = verified; }
    
    public Boolean getIsPrivate() { return isPrivate; }
    public void setIsPrivate(Boolean isPrivate) { this.isPrivate = isPrivate; }
    
    public String getAccountType() { return accountType; }
    public void setAccountType(String accountType) { this.accountType = accountType; }
    
    public String getBusinessCategory() { return businessCategory; }
    public void setBusinessCategory(String businessCategory) { this.businessCategory = businessCategory; }
    
    public Long getResponsibleUserId() { return responsibleUserId; }
    public void setResponsibleUserId(Long responsibleUserId) { this.responsibleUserId = responsibleUserId; }
    
    public Integer getFollowerTarget() { return followerTarget; }
    public void setFollowerTarget(Integer followerTarget) { this.followerTarget = followerTarget; }
    
    public Double getEngagementTarget() { return engagementTarget; }
    public void setEngagementTarget(Double engagementTarget) { this.engagementTarget = engagementTarget; }
    
    public LocalDateTime getRegistrationDate() { return registrationDate; }
    public void setRegistrationDate(LocalDateTime registrationDate) { this.registrationDate = registrationDate; }
    
    public LocalDateTime getLastSyncDate() { return lastSyncDate; }
    public void setLastSyncDate(LocalDateTime lastSyncDate) { this.lastSyncDate = lastSyncDate; }
    
    public LocalDateTime getNextSyncDate() { return nextSyncDate; }
    public void setNextSyncDate(LocalDateTime nextSyncDate) { this.nextSyncDate = nextSyncDate; }
    
    public LocalDateTime getLastPostDate() { return lastPostDate; }
    public void setLastPostDate(LocalDateTime lastPostDate) { this.lastPostDate = lastPostDate; }
    
    public LocalDateTime getLastMetricsUpdate() { return lastMetricsUpdate; }
    public void setLastMetricsUpdate(LocalDateTime lastMetricsUpdate) { this.lastMetricsUpdate = lastMetricsUpdate; }
    
    public String getLastSyncError() { return lastSyncError; }
    public void setLastSyncError(String lastSyncError) { this.lastSyncError = lastSyncError; }
    
    public Map<String, Object> getMetrics() { return metrics; }
    public void setMetrics(Map<String, Object> metrics) { this.metrics = metrics; }
    
    public Map<String, Object> getAdditionalData() { return additionalData; }
    public void setAdditionalData(Map<String, Object> additionalData) { this.additionalData = additionalData; }
    
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
    
    public LocalDateTime getUpdatedAt() { return updatedAt; }
    public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
    
    public Boolean getDeleted() { return deleted; }
    public void setDeleted(Boolean deleted) { this.deleted = deleted; }
}
