Example #1
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ArChar::instance(32)));
     $schema->registerField(new ARForeignKeyField("userID", "User", "ID", "User", ARInteger::instance()));
     $schema->registerField(new ARField("lastUpdated", ArInteger::instance(12)));
     $schema->registerField(new ARField("cacheUpdated", ArInteger::instance(12)));
     $schema->registerField(new ARField("data", ArBinary::instance(0)));
 }
Example #2
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName("Currency");
     $schema->registerField(new ARPrimaryKeyField("ID", ArChar::instance(3)));
     $schema->registerField(new ARField("rate", ArFloat::instance(16)));
     $schema->registerField(new ARField("lastUpdated", ArDateTime::instance()));
     $schema->registerField(new ARField("isDefault", ArBool::instance()));
     $schema->registerField(new ARField("isEnabled", ArBool::instance()));
     $schema->registerField(new ARField("position", ARInteger::instance()));
     $schema->registerField(new ARField("pricePrefix", ARText::instance(20)));
     $schema->registerField(new ARField("priceSuffix", ARText::instance(20)));
     $schema->registerField(new ARField("decimalSeparator", ARVarchar::instance(3)));
     $schema->registerField(new ARField("thousandSeparator", ARVarchar::instance(3)));
     $schema->registerField(new ARField("decimalCount", ARInteger::instance()));
     $schema->registerField(new ARField("rounding", ARText::instance()));
 }