Proje: Okul Platform · Hub: Okul Platform — Domain

Article (Makale)

Trait’ler: HasSlug, Revisionable, SoftDeletes

Önemli field’lar:

  • slug — HasSlug trait ile otomatik Str::slug
  • show_home_page — Ana sayfada göster (StringEnumType)
  • show_on_related — İlgili makalede göster
  • is_helpfull — Faydalı mı işareti
  • view_count — Görüntülenme sayısı
  • user_id → User (editör)
  • category_id → ArticleCategory
  • school_type_id — Hangi okul tipine ait
  • location_id — Lokasyon bazlı makale

Endpoints (General):

  • GET /articles — Liste
  • GET /articles/{id} — Detay
  • GET /articles/editors — Editör listesi
  • GET /articles/{id}/next — Sonraki makale
  • POST /articles/{id}/increment-view-count — View count arttır

SchoolComment (Okul Yorumu)

Önemli field’lar:

  • commenter_name, commenter_email — Yorumcu (kayıtsız da yorum yapılabilir)
  • comment, comment_negative — Pozitif/negatif yorum
  • comment_rate — Puan (1-5)
  • do_recommend — Tavsiye eder mi
  • rated_up / rated_down — Beğeni sayıları
  • status — Onay durumu
  • approved_by, approved_at — Kim/ne zaman onayladı
  • reject_stage, reject_note — Red detayları
  • replied_id — Yanıtlama (okul yanıt verebilir)
  • show_home_page — Ana sayfada göster
  • lead_status, registration_status — Lead/kayıt bağlantısı

Endpoints (General):

  • GET /school-comments — optional auth
  • POST /school-comments — optional auth
  • POST /school-comments/{id}/rate — optional auth
  • GET /school-comments/best-commented-schools
  • GET /school-comments/latest-by-city
  • GET /school-comments/bulk-statistics

Admin: Approve/reject: PATCH /admin/school-comments/{id}/approve|reject Customer: Yoruma cevap verme: POST /customer/school-comments/{id}/reply

Campaign (Kampanya)

Tipleri:

  • discount — İndirim kampanyası
  • gift — Hediye kampanyası

Durumları: active, inactive

Okul-kampanya: school_campaigns pivot tablosu

SalesCampaign (Satış Kampanyası/İndirim Kodu)

Checkout’ta kullanılan indirim kodları. Checkout’un discount_code_id ve campaign_id field’larına bağlanır.

Scholarship (Burs)

Sabitler:

  • PENDING_SCHOLARSHIP_APPLICATION = 'pending-scholarship'
  • SCHOLARSHIP_APPLICATION = 'scholarship'
  • PASSIVE_SCHOLARSHIP = 'passive'
  • LISTING_PAGE_SCHOLARSHIP_ID = 191 — Listeleme sayfası özel burs ID

Field’lar: title, slug, description, intro, form_title, listing_body, body, year, view_count, listing_priority, exam_with_appointment, estimated_exam_date

SchoolScholarship — Okulun bursu (okul + burs + detaylar) ScholarshipExamDate — Burs sınav tarihleri

School Content (Okul İçerikleri - B2B Portal)

app/Http/Controllers/General/SchoolContent/ ve customer/school-content/:

  • Announcement — Duyurular
  • Achievement — Başarılar/ödüller (SchoolAchievementGrant)
  • Event — Etkinlikler (Activity, CalendarEvent)

HasSlug Trait

// Article, Scholarship gibi modellerde kullanılır
slug(): Attribute  // get: value, set: Str::slug($slug)

TODO notu var: unique slug sorgulanması eklenmesi gerekiyor.