addRule('$id', [ 'type' => self::TYPE_STRING, 'description' => 'Attribute ID.', 'default' => '', 'example' => '', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, 'description' => 'Attribute type.', 'default' => '', 'example' => '', ]) ->addRule('size', [ 'type' => self::TYPE_STRING, 'description' => 'Attribute size.', 'default' => 0, 'example' => 0, ]) ->addRule('required', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Is attribute required?', 'default' => false, 'example' => false, ]) ->addRule('signed', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Is attribute signed?', 'default' => true, 'example' => true, ]) ->addRule('array', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Is attribute an array?', 'default' => false, 'example' => false, ]) ->addRule('filters', [ 'type' => self::TYPE_JSON, 'description' => 'Attribute filters.', 'default' => [], 'example' => [], ]) ; } /** * Get Name * * @return string */ public function getName():string { return 'Attribute'; } /** * Get Collection * * @return string */ public function getType():string { return Response::MODEL_ATTRIBUTE; } }