Advertisement
vanchelo

Untitled

Dec 6th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.95 KB | None | 0 0
  1. <?php
  2. $xpdo_meta_map['EletterSubscribers']= array (
  3.   'package' => 'groupeletters',
  4.   'version' => '1.1',
  5.   'table' => 'eletter_subscribers',
  6.   'extends' => 'xPDOSimpleObject',
  7.   'fields' =>
  8.   array (
  9.     'crm_id' => 0,
  10.     'code' => '',
  11.     'first_name' => NULL,
  12.     'm_name' => NULL,
  13.     'last_name' => NULL,
  14.     'company' => '',
  15.     'address' => NULL,
  16.     'city' => NULL,
  17.     'state' => NULL,
  18.     'zip' => NULL,
  19.     'country' => NULL,
  20.     'email' => NULL,
  21.     'phone' => NULL,
  22.     'cell' => NULL,
  23.     'date_created' => NULL,
  24.     'active' => 0,
  25.   ),
  26.   'fieldMeta' =>
  27.   array (
  28.     'crm_id' =>
  29.     array (
  30.       'dbtype' => 'int',
  31.       'precision' => '11',
  32.       'phptype' => 'integer',
  33.       'null' => true,
  34.       'default' => 0,
  35.     ),
  36.     'code' =>
  37.     array (
  38.       'dbtype' => 'varchar',
  39.       'precision' => '32',
  40.       'phptype' => 'string',
  41.       'null' => false,
  42.       'default' => '',
  43.     ),
  44.     'first_name' =>
  45.     array (
  46.       'dbtype' => 'varchar',
  47.       'precision' => '32',
  48.       'phptype' => 'string',
  49.       'null' => true,
  50.     ),
  51.     'm_name' =>
  52.     array (
  53.       'dbtype' => 'varchar',
  54.       'precision' => '32',
  55.       'phptype' => 'string',
  56.       'null' => true,
  57.     ),
  58.     'last_name' =>
  59.     array (
  60.       'dbtype' => 'varchar',
  61.       'precision' => '32',
  62.       'phptype' => 'string',
  63.       'null' => true,
  64.     ),
  65.     'company' =>
  66.     array (
  67.       'dbtype' => 'varchar',
  68.       'precision' => '255',
  69.       'phptype' => 'string',
  70.       'null' => false,
  71.       'default' => '',
  72.     ),
  73.     'address' =>
  74.     array (
  75.       'dbtype' => 'varchar',
  76.       'precision' => '128',
  77.       'phptype' => 'string',
  78.       'null' => true,
  79.     ),
  80.     'city' =>
  81.     array (
  82.       'dbtype' => 'varchar',
  83.       'precision' => '64',
  84.       'phptype' => 'string',
  85.       'null' => true,
  86.     ),
  87.     'state' =>
  88.     array (
  89.       'dbtype' => 'varchar',
  90.       'precision' => '64',
  91.       'phptype' => 'string',
  92.       'null' => true,
  93.     ),
  94.     'zip' =>
  95.     array (
  96.       'dbtype' => 'varchar',
  97.       'precision' => '16',
  98.       'phptype' => 'string',
  99.       'null' => true,
  100.     ),
  101.     'country' =>
  102.     array (
  103.       'dbtype' => 'varchar',
  104.       'precision' => '64',
  105.       'phptype' => 'string',
  106.       'null' => true,
  107.     ),
  108.     'email' =>
  109.     array (
  110.       'dbtype' => 'varchar',
  111.       'precision' => '128',
  112.       'phptype' => 'string',
  113.       'null' => true,
  114.     ),
  115.     'phone' =>
  116.     array (
  117.       'dbtype' => 'varchar',
  118.       'precision' => '16',
  119.       'phptype' => 'string',
  120.       'null' => true,
  121.     ),
  122.     'cell' =>
  123.     array (
  124.       'dbtype' => 'varchar',
  125.       'precision' => '16',
  126.       'phptype' => 'string',
  127.       'null' => true,
  128.     ),
  129.     'date_created' =>
  130.     array (
  131.       'dbtype' => 'datetime',
  132.       'phptype' => 'datetime',
  133.       'null' => true,
  134.     ),
  135.     'active' =>
  136.     array (
  137.       'dbtype' => 'int',
  138.       'precision' => '1',
  139.       'phptype' => 'integer',
  140.       'null' => false,
  141.       'default' => 0,
  142.     ),
  143.   ),
  144.   'composites' =>
  145.   array (
  146.     'Groups' =>
  147.     array (
  148.       'class' => 'EletterGroupSubscribers',
  149.       'local' => 'id',
  150.       'foreign' => 'subscriber',
  151.       'cardinality' => 'many',
  152.       'owner' => 'local',
  153.     ),
  154.     'Queue' =>
  155.     array (
  156.       'class' => 'EletterQueue',
  157.       'local' => 'id',
  158.       'foreign' => 'subscriber',
  159.       'cardinality' => 'many',
  160.       'owner' => 'local',
  161.     ),
  162.     'Hits' =>
  163.     array (
  164.       'class' => 'EletterSubscriberHits',
  165.       'local' => 'id',
  166.       'foreign' => 'subscriber',
  167.       'cardinality' => 'many',
  168.       'owner' => 'local',
  169.     ),
  170.   ),
  171.   'validation' =>
  172.   array (
  173.     'rules' =>
  174.     array (
  175.       'email' =>
  176.       array (
  177.         'validEmail' =>
  178.         array (
  179.           'type' => 'preg_match',
  180.           'rule' => '/^[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)+$/i',
  181.           'message' => 'Email address invalid',
  182.         ),
  183.       ),
  184.     ),
  185.   ),
  186. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement