Snippets

Bob Square X84E: Untitled snippet

Created by Bob Square
<?php
$xpdo_meta_map['OrderProduct']= array (
  'package' => 'billing',
  'version' => '1.1',
  'table' => 'billing_order_products',
  'extends' => 'xPDOSimpleObject',
  'fields' => 
  array (
    'order_id' => NULL,
    'product_id' => NULL,
	'transfer_tab' => '',
	'dep' => '',
	'des' => '',
    'quantity' => NULL,
    'price' => 0, 
	'distance' => 0,
    'currency_id' => NULL,
	'booking_class'  => '',
	'booking_starts_at_1x' => 0,
	'booking_starts_at_2x' => 0,
	'booking_starts_at_3x' => 0,
	'booking_starts_at_4x' => 0,
	'booking_starts_at_5x' => 0,
	'airline_code' => '',
	'additional_comments' => '',
  ),
  'fieldMeta' => 
  array (
    'order_id' => 
    array (
      'dbtype' => 'int',
      'precision' => '10',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
      'index' => 'index',
    ),
    'product_id' => 
    array (
      'dbtype' => 'int',
      'precision' => '10',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
    ),
    'transfer_tab' => 
    array (
      'dbtype' => 'varchar',
      'precision' => '10',
      'phptype' => 'string',
      'null' => false,
      'default' =>'',
    ),
    'dep' => 
    array (
      'dbtype' => 'text',
      'precision' => '100',
      'phptype' => 'text',
      'null' => false,
      'default' =>'',
    ),
    'des' => 
    array (
      'dbtype' => 'text',
      'precision' => '100',
      'phptype' => 'text',
      'null' => false,
      'default' =>'',
    ),
    'quantity' => 
    array (
      'dbtype' => 'int',
      'precision' => '10',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
    ),
    'testut' => 
    array (
      'dbtype' => 'text',
      'precision' => '10',
      'phptype' => 'text',
      'null' => false,
      'default' =>'',
    ),
    'price' => 
    array (
      'dbtype' => 'double',
      'attributes' => 'unsigned',
      'phptype' => 'float',
      'null' => false,
      'default' => 0,
    ),
    'distance' => 
    array (
      'dbtype' => 'double',
      'attributes' => 'unsigned',
      'phptype' => 'float',
      'null' => false,
      'default' => 0,
    ),
    'duration' => 
    array (
      'dbtype' => 'double',
      'attributes' => 'unsigned',
      'phptype' => 'float',
      'null' => false,
      'default' => 0,
    ),
    'currency_id' => 
    array (
      'dbtype' => 'int',
      'precision' => '10',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
      'index' => 'index',
    ),
    'booking_class' => 
    array (
      'dbtype' => 'varchar',
      'precision' => '10',
      'phptype' => 'string',
      'null' => false,
      'default' =>'',
    ),
    'booking_starts_at_1x' => 
    array (
      'dbtype' => 'int',
      'precision' => '2',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
      'default' => 0,
    ),
    'booking_starts_at_2x' => 
    array (
      'dbtype' => 'int',
      'precision' => '2',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
      'default' => 0,
    ),
    'booking_starts_at_3x' => 
    array (
      'dbtype' => 'int',
      'precision' => '4',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
      'default' => 0,
    ),
    'booking_starts_at_4x' => 
    array (
      'dbtype' => 'int',
      'precision' => '2',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
      'default' => 0,
    ),
    'booking_starts_at_5x' => 
    array (
      'dbtype' => 'int',
      'precision' => '2',
      'attributes' => 'unsigned',
      'phptype' => 'integer',
      'null' => false,
      'default' => 0,
    ),
    'airline_code' => 
    array (
      'dbtype' => 'varchar',
      'precision' => '100',
      'phptype' => 'text',
      'null' => false,
      'default' =>'',
    ),
    'additional_comments' => 
    array (
      'dbtype' => 'text',
      'precision' => '100',
      'phptype' => 'text',
      'null' => false,
      'default' =>'',
    ),
  ),
  'indexes' => 
  array (
    'order_id' => 
    array (
      'alias' => 'order_id',
      'primary' => false,
      'unique' => true,
      'type' => 'BTREE',
      'columns' => 
      array (
        'order_id' => 
        array (
          'length' => '',
          'collation' => 'A',
          'null' => false,
        ),
        'product_id' => 
        array (
          'length' => '',
          'collation' => 'A',
          'null' => false,
        ),
      ),
    ),
    'currency_id' => 
    array (
      'alias' => 'currency_id',
      'primary' => false,
      'unique' => false,
      'type' => 'BTREE',
      'columns' => 
      array (
        'currency_id' => 
        array (
          'length' => '',
          'collation' => 'A',
          'null' => false,
        ),
      ),
    ),
  ),
    'aggregates' => array(
        'Order' => 
        array (
          'class' => 'Order',
          'local' => 'order_id',
          'foreign' => 'id',
          'cardinality' => 'one',
          'owner' => 'foreign',
        ),
        'Product' => 
        array (
          'class' => 'ShopmodxProduct',
          'local' => 'product_id',
          'foreign' => 'id',
          'cardinality' => 'one',
          'owner' => 'foreign',
        ),
    ),
);

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.