Ejemplo n.º 1
0
 /**
  * @param SerializerFactoryInterface $serializerFactory
  * @param array $options
  * @return Metadata
  */
 public static function initMetadata(SerializerFactoryInterface $serializerFactory, array $options = [])
 {
     $metadata = new Metadata($serializerFactory);
     $metadata->setEntity(\App\Model\Entity\CountryLanguage::class);
     $metadata->setConnectionName('main');
     $metadata->setDatabase('heroku_44a071ce1e8ee67');
     $metadata->setTable('t_countrylanguage_col');
     $metadata->addField(['primary' => true, 'fieldName' => 'code', 'columnName' => 'cou_code', 'type' => 'string']);
     $metadata->addField(['primary' => true, 'fieldName' => 'language', 'columnName' => 'col_language', 'type' => 'string']);
     $metadata->addField(['fieldName' => 'official', 'columnName' => 'col_is_official', 'type' => 'boolean']);
     $metadata->addField(['fieldName' => 'percentage', 'columnName' => 'col_percentage', 'type' => 'double']);
     return $metadata;
 }
Ejemplo n.º 2
0
Archivo: City.php Proyecto: plispe/kiss
 /**
  * @param SerializerFactoryInterface $serializerFactory
  * @param array $options
  * @return Metadata
  */
 public static function initMetadata(SerializerFactoryInterface $serializerFactory, array $options = [])
 {
     $metadata = new Metadata($serializerFactory);
     $metadata->setEntity(\App\Model\Entity\City::class);
     $metadata->setConnectionName('main');
     $metadata->setDatabase('heroku_44a071ce1e8ee67');
     $metadata->setTable('t_city_cit');
     $metadata->addField(['primary' => true, 'autoincrement' => true, 'fieldName' => 'id', 'columnName' => 'cit_id', 'type' => 'int']);
     $metadata->addField(['fieldName' => 'name', 'columnName' => 'cit_name', 'type' => 'string']);
     $metadata->addField(['fieldName' => 'countryCode', 'columnName' => 'cou_code', 'type' => 'string']);
     $metadata->addField(['fieldName' => 'district', 'columnName' => 'cit_district', 'type' => 'string']);
     $metadata->addField(['fieldName' => 'population', 'columnName' => 'cit_population', 'type' => 'int']);
     return $metadata;
 }
Ejemplo n.º 3
0
 /**
  * @param  SerializerFactoryInterface $serializerFactory
  * @param  array $options
  * @return \CCMBenchmark\Ting\Repository\Metadata
  */
 public static function initMetadata(SerializerFactoryInterface $serializerFactory, array $options = [])
 {
     $metadata = new Metadata($serializerFactory);
     $metadata->setConnectionName('main');
     $metadata->setDatabase('heroku_44a071ce1e8ee67');
     $metadata->setTable("changelog");
     $metadata->setEntity(\App\Model\Entity\Changelog::class);
     $metadata->addField(['primary' => true, 'autoincrement' => true, 'fieldName' => 'id', 'columnName' => 'id', 'type' => 'int']);
     $metadata->addField(['fieldName' => 'table', 'columnName' => 'table', 'type' => "string"]);
     $metadata->addField(['fieldName' => 'recordId', 'columnName' => 'record_id', 'type' => "int"]);
     $metadata->addField(['fieldName' => 'property', 'columnName' => 'property', 'type' => "string"]);
     $metadata->addField(['fieldName' => 'oldValue', 'columnName' => 'old_value', 'type' => "string"]);
     $metadata->addField(['fieldName' => 'newValue', 'columnName' => 'new_value', 'type' => "string"]);
     $metadata->addField(['fieldName' => 'identity', 'columnName' => 'identity', 'type' => 'int']);
     return $metadata;
 }