Proje: Okul Platform · Hub: Okul Platform — Domain

Gizlenen Alanlar (Masked)

/** @property-read string|null $masked_parent_name */
/** @property-read string|null $masked_student_name */
/** @property-read int|null $current_student_age */
/** @property-read int|null $current_student_class */

B2B portal’da velinin adı maskString() ile gizlenir. Okul sahibi tam adı göremez (KVKK).

B2B Lead Listesi (scopeCustomerFilter)

B2B portala gösterilen alanlar kısıtlı:

id, name, email, phone, student_class, date_of_birth, student_name,
status, created_at, message, message_visible_status, school_id,
stage_id, approved_type, school_answered_deal_status, customer_viewed_at

scopeCustomerFilter Filtreleri

id, school_id, user_id, type, approved_type, school_type_id
approved_status_id, stage_id, status, student_class
customer-viewed, date-of-birth, starts-on, ends-on, not-today
search (name/school_name/email/student_name içinde arama)

scopeAdminFilter

Admin için genişletilmiş filtre seçenekleri.

customer_viewed_at

Okul sahibi lead’i görüntülediğinde bu alan set edilir. AllowedFilter::scope('customer-viewed') ile “görüntülenmiş/görüntülenmemiş” filter.

message_visible_status

Lead mesajının B2B portala gösterilip gösterilmeyeceği. StringEnumType::FALSE varsayılan — yani mesaj normalde gizli.

Lead Yaş Hesaplama

const SCHOOL_START_AGE = 6  // Okul başlangıç yaşı
$lead->current_student_age   // date_of_birth'den hesaplanmış yaş
$lead->current_student_class // Yaşa göre hesaplanan sınıf