extension {{classname}}DiscriminatorExt on {{classname}} {
    String? get discriminatorValue {
        {{#mappedModels}}
        if (this is {{modelName}}) {
            return r'{{mappingName}}';
        }
        {{/mappedModels}}
        return null;
    }
}
extension {{classname}}BuilderDiscriminatorExt on {{classname}}Builder {
    String? get discriminatorValue {
        {{#mappedModels}}
        if (this is {{modelName}}Builder) {
            return r'{{mappingName}}';
        }
        {{/mappedModels}}
        return null;
    }
}