<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Activity extends Model {
    protected $fillable=['organization_id','title','type','description','start_at','end_at','location','latitude','longitude','participants_count','budget','report','featured_image','status','public_visible','aggregate_to_main'];
    protected $casts=['start_at'=>'datetime','end_at'=>'datetime','public_visible'=>'boolean','aggregate_to_main'=>'boolean','latitude'=>'decimal:7','longitude'=>'decimal:7'];
    public function organization(){ return $this->belongsTo(Organization::class); }
    public function attendanceSessions(){ return $this->hasMany(AttendanceSession::class); }
}
