Files
roi-theme/wp-content/plugins/wp-marketing-automations/includes/db/tables/class-bwfan-db-table-link-metrics.php
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

51 lines
1.1 KiB
PHP
Executable File

<?php
/**
* bwfan_link_metrics table class
*
*/
if ( ! class_exists( 'BWFAN_DB_Table_Link_Metrics' ) ) {
class BWFAN_DB_Table_Link_Metrics extends BWFAN_DB_Tables_Base {
public $table_name = 'bwfan_link_metrics';
/**
* Get table's columns
*
* @return string[]
*/
public function get_columns() {
return [
"ID",
"link_id",
"contact_id",
"ip_address",
"count",
"created_at",
"updated_at"
];
}
/**
* Get query for create table
*
* @return string
*/
public function get_create_table_query() {
global $wpdb;
$collate = $this->get_collation();
return "CREATE TABLE {$wpdb->prefix}$this->table_name (
`ID` bigint(20) unsigned NOT NULL auto_increment,
`link_id` int(12) unsigned NOT NULL default 0,
`contact_id` bigint(20) unsigned NOT NULL default 0,
`ip_address` varchar(45) NULL,
`count` int(7) unsigned NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`ID`),
KEY `link_id` (`link_id`),
KEY `contact_id` (`contact_id`)
) $collate;";
}
}
}