Proje: Okul Platform · Hub: Okul Platform — Domain
Article (Makale)
Trait’ler: HasSlug, Revisionable, SoftDeletes
Önemli field’lar:
slug— HasSlug trait ile otomatik Str::slugshow_home_page— Ana sayfada göster (StringEnumType)show_on_related— İlgili makalede gösteris_helpfull— Faydalı mı işaretiview_count— Görüntülenme sayısıuser_id→ User (editör)category_id→ ArticleCategoryschool_type_id— Hangi okul tipine aitlocation_id— Lokasyon bazlı makale
Endpoints (General):
GET /articles— ListeGET /articles/{id}— DetayGET /articles/editors— Editör listesiGET /articles/{id}/next— Sonraki makalePOST /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 yorumcomment_rate— Puan (1-5)do_recommend— Tavsiye eder mirated_up / rated_down— Beğeni sayılarıstatus— Onay durumuapproved_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österlead_status, registration_status— Lead/kayıt bağlantısı
Endpoints (General):
GET /school-comments— optional authPOST /school-comments— optional authPOST /school-comments/{id}/rate— optional authGET /school-comments/best-commented-schoolsGET /school-comments/latest-by-cityGET /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— DuyurularAchievement— 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.
Related
- api-domain-model — Model listesi
- api-b2b-customer-portal — B2B portal içerik endpoint’leri