MFieldDecimal constructor

MFieldDecimal({
  1. required String name,
  2. bool isPrimaryKey = false,
  3. bool isAutoIncrement = false,
  4. bool isNullable = false,
  5. String defaultValue = '',
  6. String? comment,
  7. List<ValidatorEvent> validators = const [],
  8. int m = 10,
  9. int d = 2,
})

Creates a DECIMAL field.

m specifies the total number of digits (precision, default: 10) d specifies the number of digits after the decimal point (scale, default: 2)

Implementation

MFieldDecimal({
  required super.name,
  super.isPrimaryKey = false,
  super.isAutoIncrement = false,
  super.isNullable = false,
  super.defaultValue = '',
  super.comment,
  super.validators = const [],
  int m = 10,
  int d = 2,
}) : super(type: FieldTypes.DECIMAL) {
  _options = '($m,$d)';
}