Remove Options Duplication

This commit is contained in:
wlfio 2020-04-01 14:43:51 +01:00 committed by GitHub
parent 961a52ffb3
commit e7969d66ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,11 +142,7 @@ abstract class Base{{ class_name }}Model extends AbstractModel implements ModelI
'length' => {{ column.getMaxLength }},
{% endif %}
{% if column.getDbType == 'enum' and column.getPhpType == 'string' %}
'options' => [
{% for permittedValue in column.getPermittedValues %}
'{{ permittedValue }}',
{% endfor %}
],
'options' => self::OPTIONS_{{ column.getFieldSanitised|upper }},
{% if column.getDefaultvalue %}
'default' => '{{ column.getDefaultValue() }}',
{% endif %}