<?php

class CF_SharedGroup
{
    public $id;
    public $name;
    public $description;
    public $priority;
    public $creator;
    public $creation_time;
    public $deletion_time;
    public $filter;
    public $filter_sql;
    public $meta_data;
    public $type;

    public function __construct($data = [])
    {
        $this->id = $data['id'] ?? null;
        $this->name = $data['name'] ?? null;
        $this->description = $data['description'] ?? null;
        $this->priority = $data['priority'] ?? null;
        $this->creator = $data['creator'] ?? null;
        $this->creation_time = $data['creation_time'] ?? null;
        $this->deletion_time = $data['deletion_time'] ?? null;
        $this->filter = $data['filter'] ?? null;
        $this->filter_sql = $data['filter_sql'] ?? null;
        $this->meta_data = isset($data['meta_data']) ? json_decode($data['meta_data'], true) : null;
        $this->type = $data['type'] ?? null;
    }

    public function getId()
    {
        return $this->id;
    }

    public function getName()
    {
        return $this->name;
    }

    public function getFilter()
    {
        return $this->filter;
    }

    public function getFilterSql()
    {
        return $this->filter_sql;
    }
}
