Proje: Okul.com.tr CRM · Hub: Okul.com.tr CRM — Domain
CRM Okul Entity Modeli
Temel Alanlar
interface School {
id: number;
school_id: number; // ayrı bir okul ID'si (okulun kendi ID'si)
name: string; // okul adı
school_name: string; // alternatif okul adı alanı
about: string;
mission: string;
vision: string;
history: string;
meta_title: string;
description: string;
psychological_advice: boolean;
total_students: number;
class_students: number;
status: boolean;
monthly_lead_limit: number;
hidden_lead_form: boolean;
hidden_lead_phone: boolean;
school_type_id: number;
sector_id: number; // 1: Devlet, 2: Özel
college_id: number;
redirect_id?: number;
customer_id?: number;
campus_id?: number;
is_customer: string;
school_closed: any;
deleted_at: string | null;
}
İlişkiler (Include ile Yüklenir)
| İlişki | Include Adı | Açıklama |
|---|
| Okul tipi | type veya school_type | SchoolType objesi |
| Sektör | sector | Devlet/Özel |
| Kolej | college | Bağlı kolej |
| Yönlendirme | redirect | Redirect hedefi |
| Müşteri | customer | Bağlı müşteri |
| Kampüs | campus | Kampüs bilgisi |
| Konum | location, location.province, location.county, location.neighbourhood | Hiyerarşik konum |
| İletişim | contacts, contacts.type | Telefon, email vb |
| Anaokulu detay | kindergarten | Yaş aralığı |
| Lise tipi | high-school, high-school.type | Lise bilgisi |
| Tesisler | facilities | Spor salonu, yüzme havuzu vb |
| Hizmetler | services | Taşıma, yemek vb |
| Öğrenme dilleri | learning-languages | İngilizce, Fransızca vb |
| Aktiviteler | activities, activities.activity-type | Kulüpler vb |
| Vardiyalar | shifts | Öğle, tam gün vb |
| Ücretler | fees | SchoolFee bilgisi |
| S-C soruları | answers, answers.question | Özelleştirilmiş sorular |
| Etiketler | tags | Serbest etiketler |
| Özellikler | features, features.values, features.school-types | SchoolFeature |
Okul Durumları (filter[status])
| Değer | Anlam |
|---|
| 1 | Aktif |
| 2 | Pasif |
| 3 | Silindi |
| 4 | Yönlendirildi (redirect var) |
Sektörler
| sector_id | Anlam |
|---|
| 1 | Devlet |
| 2 | Özel |
URL Filtre → API Eşlemesi (Okullar)
city → filter[location-1]
district → filter[location-2]
neighborhood → filter[location-3]
school_name → filter[school-name]
sector-id → filter[sector-id]
type-id → filter[type-id]
school-id → filter[school-id]
status → filter[status]
SchoolFormValues bazı alanları School tipinden farklı alır:
status: boolean (formda) vs status: boolean (API’de) — aynı
sector_id: number zorunlu (formda 0 ile başlar, submit’te validate edilir)