model method

void model ()

Implementation

static void model() {
  // create a model with a single entity and a single property
  final modelInfo = ModelInfo.createDefault();
  final property = ModelProperty(
      IdUid(1, int64_max - 1), 'id', OBXPropertyType.Long, 0, null);
  final entity =
      ModelEntity(IdUid(1, int64_max), null, 'entity', [], modelInfo);
  property.entity = entity;
  entity.properties.add(property);
  entity.lastPropertyId = property.id;
  modelInfo.entities.add(entity);
  modelInfo.lastEntityId = entity.id;
  modelInfo.validate();

  final model = Model(modelInfo);
  checkObx(bindings.obx_model_free(model.ptr));
}