public static function fromArray(array $data, $filter = false){
        $class = get_called_class();
        $object = new static();
        foreach($data as $key => $value){
            if(!$filter || property_exists($class, $key)){
                $object->$key = $value;
            }
        }
        return $object;
    }