prefix.DB::$namespace.'_api_logs'; } public function __construct() { parent::__construct(); $this->table_name = $this->prefix.'_api_logs'; $this->primary_key = 'id'; $this->version = '1.1'; } public function sql_create() { return "CREATE TABLE {$this->table_name} ( id bigint(20) NOT NULL AUTO_INCREMENT, uuid varchar(36) NOT NULL, restaurant_id bigint(20) DEFAULT NULL, api_key_id bigint(20) DEFAULT NULL, action varchar(50) NOT NULL, status_code int DEFAULT NULL, request_body longtext DEFAULT NULL, response_body longtext DEFAULT NULL, ip_address varchar(45) DEFAULT NULL, idempotency_key varchar(64) DEFAULT NULL, date_created datetime NOT NULL, date_modified datetime NOT NULL, PRIMARY KEY (id), UNIQUE KEY idempotency_key (idempotency_key), KEY restaurant_id (restaurant_id), KEY api_key_id (api_key_id) )"; } } SRR_DB_Api_Logs::init();