<?php
{{#models}}{{#model}}
namespace {{package}};

use Articus\DataTransfer\Annotation as DTA;

/**
{{#description}}
 * {{description}}
{{/description}}
 */
class {{classname}} 
{
{{#vars}}
    /**
{{#description}}
     * {{description}}
{{/description}}
     * @DTA\Data(field="{{baseName}}"{{^required}}, nullable=true{{/required}})
{{^isPrimitiveType}}
{{^isListContainer}}
{{^isDate}}
{{^isDateTime}}
     * @DTA\Strategy(name="Object", options={"type":{{datatype}}::class})
     * @DTA\Validator(name="Dictionary", options={"type":{{datatype}}::class})
{{/isDateTime}}
{{/isDate}}
{{#isDate}}
     * @DTA\Strategy(name="Date")
     * @DTA\Validator(name="Date")
{{/isDate}}
{{#isDateTime}}
     * @DTA\Strategy(name="DateTime")
     * @DTA\Validator(name="Date", options={"format": \DateTime::RFC3339})
{{/isDateTime}}
{{/isListContainer}}
{{#isListContainer}}
     * @DTA\Strategy(name="ObjectArray", options={"type":{{#items}}{{datatype}}{{/items}}::class})
     * @DTA\Validator(name="Collection", options={"validators":{
     *     {"name":"Dictionary", "options":{"type":{{#items}}{{datatype}}{{/items}}::class}}
     * }})
{{/isListContainer}}
{{/isPrimitiveType}}
{{#isPrimitiveType}}
{{#isListContainer}}
{{#items}}
{{#isString}}
     * @DTA\Validator(name="Collection", options={"validators":{
     *     {"name":"Type", "options":{"type":"string"}}
     * }})
{{/isString}}
{{#isInteger}}
     * @DTA\Validator(name="Collection", options={"validators":{
     *     {"name":"Type", "options":{"type":"int"}}
     * }})
{{/isInteger}}
{{#isLong}}
     * @DTA\Validator(name="Collection", options={"validators":{
     *     {"name":"Type", "options":{"type":"int"}}
     * }})
{{/isLong}}
{{#isBoolean}}
     * @DTA\Validator(name="Collection", options={"validators":{
     *     {"name":"Type", "options":{"type":"bool"}}
     * }})
{{/isBoolean}}
{{#isFloat}}
     * @DTA\Validator(name="Collection", options={"validators":{
     *     {"name":"Type", "options":{"type":"float"}}
     * }})
{{/isFloat}}
{{#isDouble}}
     * @DTA\Validator(name="Collection", options={"validators":{
     *     {"name":"Type", "options":{"type":"float"}}
     * }})
{{/isDouble}}
{{/items}}
{{/isListContainer}}
{{^isListContainer}}
{{#isString}}
     * @DTA\Validator(name="Type", options={"type":"string"})
{{/isString}}
{{#isInteger}}
     * @DTA\Validator(name="Type", options={"type":"int"})
{{/isInteger}}
{{#isLong}}
     * @DTA\Validator(name="Type", options={"type":"int"})
{{/isLong}}
{{#isBoolean}}
     * @DTA\Validator(name="Type", options={"type":"bool"})
{{/isBoolean}}
{{#isFloat}}
     * @DTA\Validator(name="Type", options={"type":"float"})
{{/isFloat}}
{{#isDouble}}
     * @DTA\Validator(name="Type", options={"type":"float"})
{{/isDouble}}
{{/isListContainer}}
{{/isPrimitiveType}}
{{#hasValidation}}
{{#minLength}}
{{#maxLength}}
     * @DTA\Validator(name="StringLength", options={"min":{{minLength}}, "max":{{maxLength}}})
{{/maxLength}}
{{/minLength}}
{{^minLength}}
{{#maxLength}}
     * @DTA\Validator(name="StringLength", options={"max":{{maxLength}}})
{{/maxLength}}
{{/minLength}}
{{#minLength}}
{{^maxLength}}
     * @DTA\Validator(name="StringLength", options={"min":{{minLength}}})
{{/maxLength}}
{{/minLength}}
{{#minimum}}
     * @DTA\Validator(name="GreaterThan", options={"min":{{minimum}}{{^exclusiveMinimum}}, "inclusive":true{{/exclusiveMinimum}}})
{{/minimum}}
{{#maximum}}
     * @DTA\Validator(name="LessThan", options={"max":{{maximum}}{{^exclusiveMaximum}}, "inclusive":true{{/exclusiveMaximum}}})
{{/maximum}}
{{#pattern}}
     * @DTA\Validator(name="Regex", options={"pattern":"{{pattern}}})
{{/pattern}}
{{/hasValidation}}
     * @var {{datatype}}
     */
    public ${{name}};
{{/vars}}
}
{{/model}}{{/models}}
