import type { Customer, PublicCustomer, PublicStaffUser, StaffUser } from "../@types/auth.js";

export const toPublicCustomer = (customer: Customer): PublicCustomer => ({
  id: customer.id,
  email: customer.email,
  name: customer.name,
  phoneNumber: customer.phoneNumber,
  emailVerifiedAt: customer.emailVerifiedAt,
  createdAt: customer.createdAt,
});

export const toPublicStaffUser = (staff: StaffUser): PublicStaffUser => ({
  id: staff.id,
  name: staff.name,
  email: staff.email,
  role: staff.role,
  isActive: staff.isActive,
  emailVerifiedAt: staff.emailVerifiedAt,
  createdAt: staff.createdAt,
});
