import {
  ExternalProfile,
} from '../entities/external-profile.entity';

export class ResponseExternalProfileDto {
  id: string;
  userId: string;
  companyId: string;
  firstName: string;
  lastName: string;
  nationalId?: string | null;
  jobTitle?: string | null;
  isPrimaryContact: boolean;
  onboardingStep?: string | null;
  onboardingCompleted: boolean;
  createdAt: Date;
  updatedAt: Date;

  constructor(profile: ExternalProfile) {
    this.id = profile.id;
    this.userId = profile.userId;
    this.companyId = profile.companyId;
    this.firstName = profile.firstName;
    this.lastName = profile.lastName;
    this.nationalId = profile.nationalId;
    this.jobTitle = profile.jobTitle;
    this.isPrimaryContact = profile.isPrimaryContact;
    this.onboardingStep = profile.onboardingStep ?? null;
    this.onboardingCompleted = profile.onboardingCompleted ?? false;
    this.createdAt = profile.createdAt;
    this.updatedAt = profile.updatedAt;
  }
}
