toModel method
Implementation
@override
Model toModel() {
return Model(
name: description().title,
icon: IconPackNames.mdi_numeric,
fields: [
[
fieldToModelName,
fieldToModelId,
],
[
EnumField(
id: 'numberType',
name: 'Number Type',
isRequired: true,
values: [
EnumValue(title: 'Bit', value: NumberType.bit.name),
EnumValue(title: 'Float', value: NumberType.float.name),
EnumValue(title: 'Double', value: NumberType.double.name),
EnumValue(title: 'Tiny Int', value: NumberType.tinyInt.name),
EnumValue(title: 'Small Int', value: NumberType.smallInt.name),
EnumValue(title: 'Medium Int', value: NumberType.mediumInt.name),
EnumValue(title: 'Integer', value: NumberType.integer.name),
EnumValue(title: 'Big Int', value: NumberType.bigInt.name),
],
),
EnumField(
id: 'signType',
name: 'Sign Type',
isRequired: true,
values: [
EnumValue(title: 'Signed', value: SignType.signed.name),
EnumValue(title: 'Unsigned', value: SignType.unsigned.name),
],
),
],
[
fieldToModelSort,
fieldToModelShowInList,
fieldToModelIsRequired,
],
],
);
}