示例#1
0
 /**
  * Define database schema used by this active record instance
  *
  * @param string $className Schema name
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("parentTransactionID", "Transaction", "ID", "Transaction", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("orderID", "CustomerOrder", "ID", "CustomerOrder", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("currencyID", "currency", "ID", 'Currency', ARChar::instance(3)));
     $schema->registerField(new ARForeignKeyField("realCurrencyID", "realCurrency", "ID", 'Currency', ARChar::instance(3)));
     $schema->registerField(new ARForeignKeyField("userID", "user", "ID", 'User', ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("eavObjectID", "eavObject", "ID", 'EavObject', ARInteger::instance()), false);
     $schema->registerField(new ARField("amount", ARFloat::instance()));
     $schema->registerField(new ARField("realAmount", ARFloat::instance()));
     $schema->registerField(new ARField("time", ARDateTime::instance()));
     $schema->registerField(new ARField("method", ARVarchar::instance(40)));
     $schema->registerField(new ARField("gatewayTransactionID", ARVarchar::instance(40)));
     $schema->registerField(new ARField("type", ARInteger::instance()));
     $schema->registerField(new ARField("methodType", ARInteger::instance()));
     $schema->registerField(new ARField("isCompleted", ARBool::instance()));
     $schema->registerField(new ARField("isVoided", ARBool::instance()));
     $schema->registerField(new ARField("ccExpiryYear", ARInteger::instance()));
     $schema->registerField(new ARField("ccExpiryMonth", ARInteger::instance()));
     $schema->registerField(new ARField("ccLastDigits", ARVarchar::instance(40)));
     $schema->registerField(new ARField("ccType", ARVarchar::instance(40)));
     $schema->registerField(new ARField("ccName", ARVarchar::instance(100)));
     $schema->registerField(new ARField("ccCVV", ARVarchar::instance(80)));
     $schema->registerField(new ARField("comment", ARText::instance()));
     $schema->registerField(new ARField("serializedData", ARText::instance()));
 }
示例#2
0
 /**
  * Define database schema used by this active record instance
  *
  * @param string $className Schema name
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("parentID", "CustomerOrder", "ID", "CustomerOrder", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("userID", "User", "ID", "User", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("shippingAddressID", "shippingAddress", "ID", 'UserAddress', ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("billingAddressID", "billingAddress", "ID", 'UserAddress', ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("currencyID", "currency", "ID", 'Currency', ARChar::instance(3)));
     $schema->registerField(new ARForeignKeyField("eavObjectID", "eavObject", "ID", 'EavObject', ARInteger::instance()), false);
     $schema->registerField(new ARField("invoiceNumber", ARVarchar::instance(40)));
     $schema->registerField(new ARField("checkoutStep", ARInteger::instance()));
     $schema->registerField(new ARField("dateCreated", ARDateTime::instance()));
     $schema->registerField(new ARField("dateCompleted", ARDateTime::instance()));
     $schema->registerField(new ARField("dateDue", ARDateTime::instance()));
     $schema->registerField(new ARField("startDate", ARDateTime::instance()));
     // including (first day of period)
     $schema->registerField(new ARField("endDate", ARDateTime::instance()));
     // including (last day of period)
     $schema->registerField(new ARField("totalAmount", ARFloat::instance()));
     $schema->registerField(new ARField("capturedAmount", ARFloat::instance()));
     $schema->registerField(new ARField("isMultiAddress", ARBool::instance()));
     $schema->registerField(new ARField("isFinalized", ARBool::instance()));
     $schema->registerField(new ARField("isPaid", ARBool::instance()));
     $schema->registerField(new ARField("isCancelled", ARBool::instance()));
     $schema->registerField(new ARField("isRecurring", ARBool::instance()));
     $schema->registerField(new ARField("status", ARInteger::instance()));
     $schema->registerField(new ARField("shipping", ARText::instance()));
     $schema->registerField(new ARField("rebillsLeft", ARInteger::instance()));
 }
示例#3
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField('ID', ARInteger::instance()));
     $schema->registerField(new ARField('name', ARVarchar::instance(60)));
 }
示例#4
0
 /**
  * Define database schema for Category model
  *
  * @param string $className Schema name
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     parent::defineSchema($className);
     $schema->registerField(new ARField("isEnabled", ARBool::instance()));
     $schema->registerField(new ARField("isAnyRecord", ARBool::instance()));
     $schema->registerField(new ARField("isAllSubconditions", ARBool::instance()));
     $schema->registerField(new ARField("isActionCondition", ARBool::instance()));
     $schema->registerField(new ARField("isFinal", ARBool::instance()));
     $schema->registerField(new ARField("isReverse", ARBool::instance()));
     $schema->registerField(new ARField("conditionClass", ARVarchar::instance(80)));
     $schema->registerField(new ARField("recordCount", ARInteger::instance()));
     $schema->registerField(new ARField("validFrom", ARDateTime::instance()));
     $schema->registerField(new ARField("validTo", ARDateTime::instance()));
     $schema->registerField(new ARField("subTotal", ARInteger::instance()));
     $schema->registerField(new ARField("count", ARInteger::instance()));
     $schema->registerField(new ARField("comparisonType", ARInteger::instance()));
     $schema->registerField(new ARField("position", ARInteger::instance()));
     $schema->registerField(new ARField("name", ARArray::instance()));
     $schema->registerField(new ARField("description", ARArray::instance()));
     $schema->registerField(new ARField("couponCode", ARVarchar::instance(100)));
     $schema->registerField(new ARField("couponLimitCount", ARInteger::instance()));
     $schema->registerField(new ARField("couponLimitType", ARInteger::instance()));
     $schema->registerField(new ARField("serializedCondition", ARText::instance()));
 }
示例#5
0
 /**
  * Define database schema used by this active record instance
  *
  * @param string $className Schema name
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("orderID", "CustomerOrder", "ID", "CustomerOrder", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("discountConditionID", "DiscountCondition", "ID", "DiscountCondition", ARInteger::instance()));
     $schema->registerField(new ARField("couponCode", ARVarchar::instance(255)));
 }
示例#6
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName("UserGroup");
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("eavObjectID", "eavObject", "ID", 'EavObject', ARInteger::instance()), false);
     $schema->registerField(new ARField("name", ARVarchar::instance(60)));
     $schema->registerField(new ARField("description", ARVarchar::instance(100)));
 }
示例#7
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName("UserApnToken");
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARField("userID", ARInteger::instance()));
     $schema->registerField(new ARField("token", ARVarchar::instance(256)));
     $schema->registerField(new ARField("dateCreated", ARDateTime::instance()));
 }
示例#8
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName(__CLASS__);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARField("domain", ARVarchar::instance(100)));
     $schema->registerField(new ARField("apiKey", ARVarchar::instance(100)));
     $schema->registerField(new ARField("lastImport", ARDateTime::instance()));
 }
示例#9
0
 /**
  * Define database schema
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("addressID", "address", "ID", 'UserAddress', ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("orderID", "order", "ID", 'CustomerOrder', ARInteger::instance()));
     $schema->registerField(new ARField("method", ARVarchar::instance(40)));
     $schema->registerField(new ARField("paymentData", ARText::instance()));
 }
示例#10
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARField("name", ARVarchar::instance(60)));
     $schema->registerField(new ARForeignKeyField("defaultImageID", "ManufacturerImage", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("eavObjectID", "eavObject", "ID", 'EavObject', ARInteger::instance()), false);
     $schema->registerAutoReference('defaultImageID');
 }
示例#11
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("userID", "User", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARField("isEnabled", ARBool::instance()));
     $schema->registerField(new ARField("email", ARVarchar::instance(100)));
     $schema->registerField(new ARField("confirmationCode", ARVarchar::instance(40)));
 }
示例#12
0
文件: State.php 项目: saiber/livecart
 /**
  * Define database schema
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARField("countryID", ARChar::instance(2)));
     $schema->registerField(new ARField("code", ARVarchar::instance(40)));
     $schema->registerField(new ARField("name", ARVarchar::instance(100)));
     $schema->registerField(new ARField("subdivisionType", ARVarchar::instance(60)));
 }
示例#13
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARField("status", ARInteger::instance()));
     $schema->registerField(new ARField("time", ARDateTime::instance()));
     $schema->registerField(new ARField("subject", ARVarchar::instance(255)));
     $schema->registerField(new ARField("text", ARText::instance()));
     $schema->registerField(new ARField("html", ARText::instance()));
 }
示例#14
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName(__CLASS__);
     $schema->registerField(new ARField("section", ARVarchar::instance(64)));
     $schema->registerField(new ARField("value", ARText::instance()));
     $schema->registerField(new ARField("locale", ARVarchar::instance(2)));
     $schema->registerField(new ARField("meta", ARText::instance()));
     $schema->registerField(new ARField("sort", ARInteger::instance()));
     // $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     // $schema->registerField(new ARField("type", ARVarchar::instance(16)));
 }
示例#15
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName(__CLASS__);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("ownerID", "User", "ID", "User", ARInteger::instance()));
     $schema->registerField(new ARField("menuID", ARVarchar::instance(16)));
     $schema->registerField(new ARForeignKeyField("productID", "Product", "ID", "Product", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("userID", "User", "ID", "User", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("orderID", "CustomerOrder", "ID", "CustomerOrder", ARInteger::instance()));
     $schema->registerField(new ARField("position", ARInteger::instance()));
 }
示例#16
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName(__CLASS__);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARField("menuID", ARVarchar::instance(16)));
     $schema->registerField(new ARForeignKeyField("productID", "Product", "ID", "Product", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("userID", "User", "ID", "User", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("orderID", "CustomerOrder", "ID", "CustomerOrder", ARInteger::instance()));
     $schema->registerField(new ARField("position", ARInteger::instance()));
     //  must be declared after userID, otherwise ActiveRecord will select owner as User!
     $schema->registerField(new ARForeignKeyField("ownerID", "User", "ID", "User", ARInteger::instance()));
 }
示例#17
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName(__CLASS__);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARField("isVisible", ARBool::instance()));
     $schema->registerField(new ARField("doctorName", ARVarchar::instance(255)));
     $schema->registerField(new ARField("date", ARDate::instance()));
     $schema->registerField(new ARField("time", ARTime::instance()));
     $schema->registerField(new ARField("comment", ARText::instance()));
     $schema->registerField(new ARField("eyeExamRequestID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("eyeExamRequestID", "EyeExamRequest", "ID", null, ARInteger::instance()), false);
 }
示例#18
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName(__CLASS__);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("storeID", "ClonedStore", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARField("type", ARInteger::instance(2)));
     $schema->registerField(new ARField("entity", ARVarchar::instance(100)));
     $schema->registerField(new ARField("field", ARVarchar::instance(100)));
     $schema->registerField(new ARField("find", ARText::instance()));
     $schema->registerField(new ARField("repl", ARText::instance()));
     $schema->registerField(new ARField("query", ARText::instance(100)));
 }
示例#19
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("categoryID", "Category", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("productID", "Product", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARField("isSubcategories", ARBool::instance()));
     $schema->registerField(new ARField("isVariationImages", ARBool::instance()));
     $schema->registerField(new ARField("isAllVariations", ARBool::instance()));
     $schema->registerField(new ARField("theme", ARVarchar::instance(20)));
     $schema->registerField(new ARField("listStyle", ARVarchar::instance(20)));
     return $schema;
 }
示例#20
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("parentID", "StaticPage", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARField("handle", ARVarchar::instance(255)));
     $schema->registerField(new ARField("title", ARArray::instance()));
     $schema->registerField(new ARField("text", ARArray::instance()));
     $schema->registerField(new ARField("metaDescription", ARArray::instance()));
     $schema->registerField(new ARField("menu", ARArray::instance()));
     $schema->registerField(new ARField("position", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("eavObjectID", "eavObject", "ID", 'EavObject', ARInteger::instance()), false);
 }
示例#21
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField('ID', ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField('productID', 'Product', 'ID', null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField('userID', 'User', 'ID', null, ARInteger::instance()));
     $schema->registerField(new ARField('isEnabled', ARBool::instance()));
     $schema->registerField(new ARField('dateCreated', ARDateTime::instance()));
     $schema->registerField(new ARField('ip', ARInteger::instance()));
     $schema->registerField(new ArField('ratingSum', ARInteger::instance()));
     $schema->registerField(new ArField('ratingCount', ARInteger::instance()));
     $schema->registerField(new ArField('rating', ARFloat::instance(8)));
     $schema->registerField(new ARField('nickname', ARVarchar::instance(100)));
     $schema->registerField(new ARField('title', ARVarchar::instance(255)));
     $schema->registerField(new ARField('text', ARText::instance()));
 }
示例#22
0
 /**
  * Define database schema used by this active record instance
  *
  * @param string $className Schema name
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("orderID", "CustomerOrder", "ID", "CustomerOrder", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("shippingServiceID", "ShippingService", "ID", "ShippingService", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("shippingAddressID", "shippingAddress", "ID", 'UserAddress', ARInteger::instance()));
     $schema->registerField(new ARField("trackingCode", ARVarchar::instance(100)));
     $schema->registerField(new ARField("dateShipped", ARDateTime::instance()));
     $schema->registerField(new ARField("amount", ARFloat::instance()));
     $schema->registerField(new ARField("taxAmount", ARFloat::instance()));
     $schema->registerField(new ARField("shippingAmount", ARFloat::instance()));
     $schema->registerField(new ARField("status", ARInteger::instance(2)));
     $schema->registerField(new ARField("shippingServiceData", ARText::instance(50)));
     //$schema->registerAutoReference('shippingAddressID');
 }
示例#23
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()));
 }
示例#24
0
 /**
  * Action for discount condition (define the actual discount)
  *
  * @param string $className Schema name
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("conditionID", "DiscountCondition", "ID", "DiscountCondition", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("actionConditionID", "DiscountCondition", "ID", "DiscountCondition", ARInteger::instance()));
     $schema->registerField(new ARField("isEnabled", ARBool::instance()));
     $schema->registerField(new ARField("isOrderLevel", ARBool::instance()));
     $schema->registerField(new ARField("type", ARInteger::instance()));
     $schema->registerField(new ARField("position", ARInteger::instance()));
     $schema->registerField(new ARField("discountStep", ARInteger::instance()));
     $schema->registerField(new ARField("discountLimit", ARInteger::instance()));
     $schema->registerField(new ARField("amount", ARFloat::instance()));
     $schema->registerField(new ARField("actionClass", ARVarchar::instance(80)));
     $schema->registerField(new ARField("serializedData", ARText::instance()));
 }
示例#25
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName("Product");
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("categoryID", "Category", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("manufacturerID", "Manufacturer", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("defaultImageID", "ProductImage", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("parentID", "Product", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("shippingClassID", "ShippingClass", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("taxClassID", "TaxClass", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARField("isEnabled", ARBool::instance()));
     $schema->registerField(new ARField("sku", ARVarchar::instance(20)))->validate('required', 'IsUniqueSkuCheck');
     $schema->registerField(new ARField("name", ARArray::instance()))->validate('required');
     $schema->registerField(new ARField("shortDescription", ARArray::instance()));
     $schema->registerField(new ARField("longDescription", ARArray::instance()));
     $schema->registerField(new ARField("keywords", ARText::instance()));
     $schema->registerField(new ARField("pageTitle", ARArray::instance()));
     $schema->registerField(new ARField("dateCreated", ARDateTime::instance()));
     $schema->registerField(new ARField("dateUpdated", ARDateTime::instance()));
     $schema->registerField(new ARField("URL", ARVarchar::instance(256)));
     $schema->registerField(new ARField("isFeatured", ARBool::instance()));
     $schema->registerField(new ARField("type", ARInteger::instance(4)));
     $schema->registerField(new ArField("ratingSum", ARInteger::instance()));
     //->protect();
     $schema->registerField(new ArField("ratingCount", ARInteger::instance()));
     $schema->registerField(new ArField("rating", ARFloat::instance(8)));
     $schema->registerField(new ArField("reviewCount", ARInteger::instance()));
     $schema->registerField(new ArField("minimumQuantity", ARFloat::instance(8)));
     $schema->registerField(new ArField("shippingSurchargeAmount", ARFloat::instance(8)));
     $schema->registerField(new ArField("isSeparateShipment", ARBool::instance()));
     $schema->registerField(new ArField("isFreeShipping", ARBool::instance()));
     $schema->registerField(new ArField("isBackOrderable", ARBool::instance()));
     $schema->registerField(new ArField("isFractionalUnit", ARBool::instance()));
     $schema->registerField(new ArField("isUnlimitedStock", ARBool::instance()));
     $schema->registerField(new ArField("shippingWeight", ARFloat::instance(8)));
     $schema->registerField(new ArField("stockCount", ARFloat::instance(8)));
     $schema->registerField(new ArField("reservedCount", ARFloat::instance(8)));
     $schema->registerField(new ArField("salesRank", ARInteger::instance()));
     $schema->registerField(new ArField("childSettings", ARText::instance()));
     $schema->registerField(new ArField("fractionalStep", ARFloat::instance(8)));
     $schema->registerField(new ArField("position", ARInteger::instance()));
     $schema->registerField(new ArField("categoryIntervalCache", ARText::instance()));
     $schema->registerField(new ArField("isRecurring", ARBool::instance()));
 }
示例#26
0
 /**
  * Define database schema
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("stateID", "State", "ID", 'State', ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("eavObjectID", "eavObject", "ID", 'EavObject', ARInteger::instance()), false);
     $schema->registerField(new ARField("firstName", ARVarchar::instance(60)));
     $schema->registerField(new ARField("lastName", ARVarchar::instance(60)));
     $schema->registerField(new ARField("companyName", ARVarchar::instance(60)));
     $schema->registerField(new ARField("address1", ARVarchar::instance(255)));
     $schema->registerField(new ARField("address2", ARVarchar::instance(255)));
     $schema->registerField(new ARField("city", ARVarchar::instance(255)));
     $schema->registerField(new ARField("stateName", ARVarchar::instance(255)));
     $schema->registerField(new ARField("postalCode", ARVarchar::instance(50)));
     $schema->registerField(new ARField("countryID", ARChar::instance(2)));
     $schema->registerField(new ARField("phone", ARVarchar::instance(100)));
     $schema->registerAutoReference('stateID');
 }
示例#27
0
文件: User.php 项目: saiber/www
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName("User");
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("defaultShippingAddressID", "defaultShippingAddress", "ID", 'ShippingAddress', ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("defaultBillingAddressID", "defaultBillingAddress", "ID", 'BillingAddress', ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("userGroupID", "UserGroup", "ID", "UserGroup", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("eavObjectID", "eavObject", "ID", 'EavObject', ARInteger::instance()), false);
     $schema->registerField(new ARField("locale", ARVarchar::instance(4)));
     $schema->registerField(new ARField("email", ARVarchar::instance(60)));
     $schema->registerField(new ARField("password", ARVarchar::instance(32)));
     $schema->registerField(new ARField("firstName", ARVarchar::instance(60)));
     $schema->registerField(new ARField("lastName", ARVarchar::instance(60)));
     $schema->registerField(new ARField("companyName", ARVarchar::instance(60)));
     $schema->registerField(new ARField("dateCreated", ARDateTime::instance()));
     $schema->registerField(new ARField("isEnabled", ARBool::instance()));
     $schema->registerField(new ARField("preferences", ARArray::instance()));
 }
示例#28
0
 /**
  * Define database schema
  */
 public static function defineSchema($className)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName($className);
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $group = $className . 'Group';
     $schema->registerField(new ARForeignKeyField(strtolower(substr($group, 0, 1)) . substr($group, 1) . 'ID', $group, "ID", $group, ARInteger::instance()));
     $schema->registerField(new ARField("name", ARArray::instance()));
     $schema->registerField(new ARField("description", ARArray::instance()));
     $schema->registerField(new ARField("type", ARInteger::instance(2)));
     $schema->registerField(new ARField("dataType", ARInteger::instance(2)));
     $schema->registerField(new ARField("position", ARInteger::instance(2)));
     $schema->registerField(new ARField("handle", ARVarchar::instance(40)));
     $schema->registerField(new ARField("isMultiValue", ARBool::instance()));
     $schema->registerField(new ARField("isRequired", ARBool::instance()));
     $schema->registerField(new ARField("isDisplayed", ARBool::instance()));
     $schema->registerField(new ARField("isDisplayedInList", ARBool::instance()));
     $schema->registerField(new ARField("valuePrefix", ARArray::instance()));
     $schema->registerField(new ARField("valueSuffix", ARArray::instance()));
     return $schema;
 }
示例#29
0
 public static function defineSchema($className = __CLASS__)
 {
     $schema = self::getSchemaInstance($className);
     $schema->setName("ProductOption");
     $schema->registerField(new ARPrimaryKeyField("ID", ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("productID", "Product", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("categoryID", "Category", "ID", null, ARInteger::instance()));
     $schema->registerField(new ARForeignKeyField("defaultChoiceID", "ProductOptionChoice", "ID", "ProductOptionChoice", ARInteger::instance()));
     $schema->registerField(new ARField("name", ARArray::instance()));
     $schema->registerField(new ARField("description", ARArray::instance()));
     $schema->registerField(new ARField("selectMessage", ARArray::instance()));
     $schema->registerField(new ARField("type", ARInteger::instance(4)));
     $schema->registerField(new ARField("displayType", ARInteger::instance(4)));
     $schema->registerField(new ARField("isRequired", ARBool::instance()));
     $schema->registerField(new ARField("isDisplayed", ARBool::instance()));
     $schema->registerField(new ARField("isDisplayedInList", ARBool::instance()));
     $schema->registerField(new ARField("isDisplayedInCart", ARBool::instance()));
     $schema->registerField(new ARField("isPriceIncluded", ARBool::instance()));
     $schema->registerField(new ARField("position", ARInteger::instance(4)));
     $schema->registerField(new ARField("maxFileSize", ARInteger::instance(4)));
     $schema->registerField(new ARField("fileExtensions", ARVarchar::instance(100)));
     $schema->registerCircularReference('DefaultChoice', 'ProductOptionChoice');
 }
示例#30
0
 /**
  * Define database schema
  */
 public static function defineSchema($className = __CLASS__)
 {
     $schema = parent::defineSchema($className);
     $schema->registerField(new ARField("classID", ARInteger::instance()));
     $schema->registerField(new ARField("stringIdentifier", ARVarchar::instance(40)));
 }