Commit a1d98798 authored by redray's avatar redray
Browse files

New tables for domain and billing - if you have questions: just ask me ...

parent 5456caa5
......@@ -40,6 +40,123 @@ SET FOREIGN_KEY_CHECKS = 0;
-- --------------------------------------------------------
-- --------------------------------------------------------
--
-- Table structure for table `billing_invoice`
--
CREATE TABLE `billing_invoice` (
`billing_invoice_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`invoice_number` varchar(32) NOT NULL default '',
`invoice_date` date default NULL,
`xml` longtext NOT NULL,
`total_fee_net` decimal(10,4) NOT NULL default '0.00',
`total_fee_gross` decimal(10,4) NOT NULL default '0.00',
`currency_code` char(3) default 'EUR',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `billing_product`
--
CREATE TABLE `billing_product` (
`billing_product_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`parent_id` int(11) unsigned NOT NULL default '0',
`product_name` varchar(64) default NULL,
`product_details` varchar(256) default NULL,
`template_id` int(11) unsigned NOT NULL default '0',
`service_class_id` int(11) unsigned NOT NULL default '0',
`billing_tax_id` int(11) unsigned NOT NULL default '0',
`setup_fee_gross` decimal(10,4) NOT NULL default '0.00',
`interval_fee_gross` decimal(10,4) NOT NULL default '0.00',
`interval_length` tinyint(3) NOT NULL default '0',
`interval_type` enum('non-recurring','hour','day','week','month','quarter','year') NOT NULL default 'non-recurring',
`interval_payment` enum('prepaid','postpaid') NOT NULL default 'prepaid',
`clearing_period` tinyint(3) unsigned default '1',
`currency_code` char(3) default 'EUR',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `billing_service`
--
CREATE TABLE `billing_service` (
`billing_service_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`product_id` int(11) unsigned default NULL,
`product_pid` int(11) unsigned default NULL,
`product_name` varchar(64) default NULL,
`product_details` varchar(256) default NULL,
`service_class_id` int(11) unsigned default '0',
`service_template_id` int(11) unsigned default NULL,
`service_id` int(11) unsigned default NULL,
`billing_tax_id` int(11) unsigned NOT NULL default '1',
`quantity` smallint(5) unsigned NOT NULL default '1',
`setup_fee_gross` decimal(10,4) NOT NULL default '0.00',
`interval_fee_gross` decimal(10,4) default '0.00',
`interval_fee_is_individual` tinyint(1) default '0',
`interval_length` int(11) NOT NULL default '1',
`interval_type` enum('non-recurring','hour','day','week','month','quarter','year') NOT NULL default 'non-recurring',
`interval_payment` enum('prepaid','postpaid') NOT NULL default 'prepaid',
`clearing_period` tinyint(3) unsigned default '1',
`currency_code` char(3) default 'EUR',
`is_active` tinyint(1) NOT NULL default '0',
`service_start_at` date default NULL,
`service_end_at` date default NULL,
`invoiced_upto` date default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `billing_service_class`
--
CREATE TABLE `billing_service_class` (
`billing_service_class_id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(64) NOT NULL default '',
`sort_order` int(11) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `billing_tax_class`
--
CREATE TABLE `billing_tax` (
`billing_tax_id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(64) NOT NULL default '',
`tax_rate` decimal(10,4) default NULL,
`is_default` tinyint(1) NOT NULL default '0',
`valid_from` date default NULL,
`valid_till` date default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `client`
--
......@@ -106,6 +223,38 @@ CREATE TABLE `client` (
-- --------------------------------------------------------
--
-- Table structure for table `client_address_book`
--
CREATE TABLE `client_address_book` (
`client_address_book_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`entry_role` enum('Standard','Other','Administrator','Abuse','Accounting','Owner','Emergency','Technician','Signatory') default 'Standard',
`entry_company` varchar(64) default NULL,
`entry_gender` enum('m','f') default NULL,
`entry_title` varchar(16) default NULL,
`entry_firstname` varchar(32) NOT NULL,
`entry_lastname` varchar(32) NOT NULL,
`entry_address1` varchar(64) default NULL,
`entry_address2` varchar(64) default NULL,
`entry_postcode` varchar(32) NOT NULL,
`entry_city` varchar(64) NOT NULL,
`entry_state` varchar(32) default NULL,
`entry_country` char(2) default NULL,
`entry_phone` varchar(32) default NULL,
`entry_fax` varchar(32) default NULL,
`entry_mobile` varchar(32) default NULL,
`entry_email` varchar(256) default NULL,
PRIMARY KEY (`address_book_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `client_template`
--
......@@ -221,6 +370,90 @@ CREATE TABLE `dns_template` (
-- --------------------------------------------------------
--
-- Table structure for table `domain`
--
CREATE TABLE `domain` (
`domain_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`domain_provider_id` int(11) unsigned NOT NULL default '0',
`provider_domain_id` int(11) unsigned default NULL,
`domain` varchar(255) NOT NULL default '',
`tld` varchar(32) NOT NULL default '',
`handle_desc` varchar(32) default NULL,
`handle_admin_c` varchar(32) default NULL,
`handle_tech_c` varchar(32) default NULL,
`handle_zone_c` varchar(32) default NULL,
`added_at` timestamp NULL default NULL,
`connected_at` date default NULL,
`disconnected_at` date default NULL,
`status` varchar(64) NOT NULL default '0',
PRIMARY KEY (`domain_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `domain_handle`
--
CREATE TABLE `domain_handle` (
`domain_handle_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`domain_registrar` varchar(64) default NULL,
`handle` varchar(32) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `domain_provider`
--
CREATE TABLE `domain_provider` (
`domain_provider_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`provider` varchar(255) default NULL,
`is_extern` tinyint(1) NOT NULL default '0',
`domainrobot_interface` varchar(16) default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `domain_tld`
--
CREATE TABLE `domain_tld` (
`domain_tld_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`tld` varchar(32) default NULL,
`domain_provider_id` int(11) unsigned NOT NULL default '0',
`domain_registrar` varchar(64) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `firewall`
--
......@@ -1088,6 +1321,23 @@ CREATE TABLE `country` (
-- --------------------------------------------------------
-- --------------------------------------------------------
--
-- Dumping data for table `billing_service_class`
--
INSERT INTO `billing_service_class` VALUES (1,'other',9999);
INSERT INTO `billing_service_class` VALUES (2,'hosting',10);
INSERT INTO `billing_service_class` VALUES (3,'domains',20);
INSERT INTO `billing_service_class` VALUES (4,'traffic',30);
INSERT INTO `billing_service_class` VALUES (5,'diskspace',40);
--
-- Dumping data for table `billing_tax_class`
--
INSERT INTO `billing_tax_class` VALUES (1,'USt. (DE)',19,1,'2007-01-01',NULL);
INSERT INTO `billing_tax_class` VALUES (2,'USt. ermäßigt (DE)',7,0,'2007-01-01',NULL);
--
-- Dumping data for table `dns_template`
--
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment