class CfopFX(cfop: Cfop) : ObjectFX() {
val codCfopProperty = SimpleObjectProperty(cfop.codcfop)
var codCfop by codCfopProperty
val descCfopProperty = SimpleStringProperty(cfop.desccfop)
var descCfop by descCfopProperty
val numeroCfopProperty = SimpleStringProperty(cfop.comcfop)
var numeroCfop by numeroCfopProperty
fun toPojo() = Cfop(
if (this.codCfop == 0) null else this.codCfop,
this.descCfop,
this.numeroCfop,
true)
}
class CfopModel : ItemViewModel<CfopFX>() {
val codCfop = bind(CfopFX::codCfopProperty)
val descCfop = bind(CfopFX::descCfopProperty)
val numeroCfop = bind(CfopFX::numeroCfopProperty)
}