예제 #1
0
 /**
  * Generate table orocrm_sales_lead
  *
  * @param Schema          $schema
  * @param ExtendExtension $extendExtension
  */
 public static function orocrmSalesLeadTable(Schema $schema, ExtendExtension $extendExtension)
 {
     /** Generate table orocrm_sales_lead **/
     $table = $schema->createTable('orocrm_sales_lead');
     $table->addColumn('id', 'integer', ['autoincrement' => true]);
     $table->addColumn('workflow_step_id', 'integer', ['notnull' => false]);
     $table->addColumn('workflow_item_id', 'integer', ['notnull' => false]);
     $table->addColumn('status_name', 'string', ['notnull' => false, 'length' => 32]);
     $table->addColumn('account_id', 'integer', ['notnull' => false]);
     $table->addColumn('user_owner_id', 'integer', ['notnull' => false]);
     $table->addColumn('contact_id', 'integer', ['notnull' => false]);
     $table->addColumn('address_id', 'integer', ['notnull' => false]);
     $table->addColumn('name', 'string', ['length' => 255]);
     $table->addColumn('name_prefix', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('first_name', 'string', ['length' => 255]);
     $table->addColumn('middle_name', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('last_name', 'string', ['length' => 255]);
     $table->addColumn('name_suffix', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('job_title', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('phone_number', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('email', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('company_name', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('website', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('number_of_employees', 'integer', ['notnull' => false]);
     $table->addColumn('industry', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('createdAt', 'datetime', []);
     $table->addColumn('updatedAt', 'datetime', ['notnull' => false]);
     $table->addColumn('notes', 'text', ['notnull' => false]);
     $extendExtension->addOptionSet($schema, $table, 'extend_source', ['extend' => ['set_expanded' => false]]);
     $table->setPrimaryKey(['id']);
     $table->addUniqueIndex(['workflow_item_id'], 'UNIQ_73DB46331023C4EE');
     $table->addIndex(['status_name'], 'IDX_73DB46336625D392', []);
     $table->addIndex(['contact_id'], 'IDX_73DB4633E7A1254A', []);
     $table->addIndex(['account_id'], 'IDX_73DB46339B6B5FBA', []);
     $table->addIndex(['address_id'], 'IDX_73DB4633F5B7AF75', []);
     $table->addIndex(['user_owner_id'], 'IDX_73DB46339EB185F9', []);
     $table->addIndex(['workflow_step_id'], 'IDX_73DB463371FE882C', []);
     /** End of generate table orocrm_sales_lead **/
 }