<?php

class PlayerSuspension extends Model {
    public function create($data) {
        $this->db->query("INSERT INTO player_suspensions (player_id, team_id, reason, matches_to_serve, created_at) VALUES (:player_id, :team_id, :reason, :matches, NOW())");
        $this->db->bind(':player_id', $data['player_id']);
        $this->db->bind(':team_id', $data['team_id']);
        $this->db->bind(':reason', $data['reason']);
        $this->db->bind(':matches', $data['matches_to_serve']);
        return $this->db->execute();
    }
}