PHP Classes

File: doc/DbSchema.schemaxml

Recommend this page to a friend!
  Classes of Uldis Nelsons  >  YII2 D3 PHP Accounting  >  doc/DbSchema.schemaxml  >  Download  
File: doc/DbSchema.schemaxml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: YII2 D3 PHP Accounting
Accounting module for YII2 based applications
Author: By
Last change:
Date: 1 year ago
Size: 9,088 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="UTF-8"?>
<schemadesigner version="6.5">
<source>
<database charset="latin1" collation="latin1_swedish_ci">poker_20201202</database>
</source>
<canvas zoom="100">
<tables>
<table name="ac_account" view="colnames">
<left>937</left>
<top>336</top>
<width>99</width>
<height>114</height>
<sql_create_table>CREATE TABLE `ac_account` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `code` char(10) CHARACTER SET latin1 NOT NULL COMMENT 'Code',
  `name` varchar(50) CHARACTER SET latin1 NOT NULL COMMENT 'Name',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8</sql_create_table>
</table>
<table name="ac_def" view="colnames">
<left>1090</left>
<top>413</top>
<width>99</width>
<height>131</height>
<sql_create_table>CREATE TABLE `ac_def` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `code` char(20) CHARACTER SET latin1 DEFAULT NULL,
  `account_id` smallint(5) unsigned NOT NULL COMMENT 'Account',
  `table` varchar(100) DEFAULT NULL COMMENT 'Table',
  `pk_field` varchar(100) DEFAULT NULL COMMENT 'Primary key field',
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  CONSTRAINT `ac_def_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `ac_account` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=348 DEFAULT CHARSET=utf8</sql_create_table>
</table>
<table name="ac_dim" view="colnames">
<left>918</left>
<top>92</top>
<width>88</width>
<height>114</height>
<sql_create_table>CREATE TABLE `ac_dim` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `group_id` smallint(5) unsigned NOT NULL COMMENT 'Ac_dim_group',
  `name` varchar(50) NOT NULL COMMENT 'Name',
  PRIMARY KEY (`id`),
  KEY `fk_ac_dim_group` (`group_id`),
  CONSTRAINT `fk_ac_dim_group` FOREIGN KEY (`group_id`) REFERENCES `ac_dim_group` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="ac_dim_group" view="colnames">
<left>1052</left>
<top>109</top>
<width>124</width>
<height>97</height>
<sql_create_table>CREATE TABLE `ac_dim_group` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL COMMENT 'Name',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="ac_period" view="colnames">
<left>394</left>
<top>292</top>
<width>107</width>
<height>182</height>
<sql_create_table>CREATE TABLE `ac_period` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `period_type` tinyint(3) unsigned NOT NULL COMMENT 'Type',
  `from` date NOT NULL COMMENT 'From',
  `to` date NOT NULL COMMENT 'To',
  `status` enum('Planned','Active','Closed') DEFAULT NULL COMMENT 'Status',
  `prev_period` smallint(5) unsigned DEFAULT NULL COMMENT 'Previous period',
  `next_period` smallint(5) unsigned DEFAULT NULL COMMENT 'Next Period',
  PRIMARY KEY (`id`),
  KEY `next_period` (`next_period`),
  KEY `prev_period` (`prev_period`),
  CONSTRAINT `ac_period_ibfk_1` FOREIGN KEY (`prev_period`) REFERENCES `ac_period` (`id`),
  CONSTRAINT `ac_period_ibfk_2` FOREIGN KEY (`next_period`) REFERENCES `ac_period` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8</sql_create_table>
</table>
<table name="ac_period_balance" view="colnames">
<left>541</left>
<top>394</top>
<width>137</width>
<height>131</height>
<sql_create_table>CREATE TABLE `ac_period_balance` (
  `id` mediumint(5) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `period_id` smallint(5) unsigned NOT NULL COMMENT 'Period',
  `rec_acc_id` smallint(5) unsigned NOT NULL COMMENT 'Account',
  `amount` decimal(12,2) NOT NULL COMMENT 'Amount',
  PRIMARY KEY (`id`),
  KEY `period_id` (`period_id`),
  KEY `rec_acc_id` (`rec_acc_id`),
  CONSTRAINT `ac_period_balance_ibfk_1` FOREIGN KEY (`period_id`) REFERENCES `ac_period` (`id`),
  CONSTRAINT `ac_period_balance_ibfk_2` FOREIGN KEY (`rec_acc_id`) REFERENCES `ac_rec_acc` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=188752 DEFAULT CHARSET=utf8</sql_create_table>
</table>
<table name="ac_period_balance_dim" view="colnames">
<left>726</left>
<top>275</top>
<width>165</width>
<height>148</height>
<sql_create_table>CREATE TABLE `ac_period_balance_dim` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `period_id` smallint(5) unsigned NOT NULL COMMENT 'Period',
  `dim_id` smallint(5) unsigned NOT NULL COMMENT 'Dimension',
  `amount` decimal(12,2) NOT NULL COMMENT 'Amount',
  `account_id` smallint(5) unsigned NOT NULL COMMENT 'Account',
  PRIMARY KEY (`id`),
  KEY `fk_ac_period_balance_dim_ac_period` (`period_id`),
  KEY `fk_ac_period_balance_dim_ac_dim` (`dim_id`),
  KEY `fk_ac_period_balance_dim_ac_account` (`account_id`),
  CONSTRAINT `fk_ac_period_balance_dim_ac_account` FOREIGN KEY (`account_id`) REFERENCES `ac_account` (`id`),
  CONSTRAINT `fk_ac_period_balance_dim_ac_dim` FOREIGN KEY (`dim_id`) REFERENCES `ac_dim` (`id`),
  CONSTRAINT `fk_ac_period_balance_dim_ac_period` FOREIGN KEY (`period_id`) REFERENCES `ac_period` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="ac_rec_acc" view="colnames">
<left>727</left>
<top>426</top>
<width>99</width>
<height>114</height>
<sql_create_table>CREATE TABLE `ac_rec_acc` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `account_id` smallint(5) unsigned NOT NULL COMMENT 'Account',
  `label` varchar(100) DEFAULT NULL COMMENT 'Label',
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  CONSTRAINT `ac_rec_acc_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `ac_account` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14690 DEFAULT CHARSET=utf8</sql_create_table>
</table>
<table name="ac_rec_ref" view="colnames">
<left>934</left>
<top>455</top>
<width>124</width>
<height>131</height>
<sql_create_table>CREATE TABLE `ac_rec_ref` (
  `id` smallint(5) NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `def_id` smallint(5) unsigned NOT NULL,
  `rec_account_id` smallint(5) unsigned NOT NULL,
  `pk_value` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `rec_account_id` (`rec_account_id`),
  KEY `def_id` (`def_id`,`pk_value`,`rec_account_id`),
  CONSTRAINT `ac_rec_ref_ibfk_2` FOREIGN KEY (`rec_account_id`) REFERENCES `ac_rec_acc` (`id`),
  CONSTRAINT `ac_rec_ref_ibfk_3` FOREIGN KEY (`def_id`) REFERENCES `ac_def` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28340 DEFAULT CHARSET=utf8</sql_create_table>
</table>
<table name="ac_tran" view="colnames">
<left>531</left>
<top>79</top>
<width>138</width>
<height>253</height>
<sql_create_table>CREATE TABLE `ac_tran` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sys_company_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `period_id` smallint(5) unsigned NOT NULL COMMENT 'Period',
  `accounting_date` date NOT NULL COMMENT 'Accountig Date',
  `debit_rec_acc_id` smallint(5) unsigned NOT NULL COMMENT 'Debit account',
  `credit_rec_acc_id` smallint(5) unsigned NOT NULL COMMENT 'Credit account',
  `amount` decimal(10,2) unsigned NOT NULL COMMENT 'Amount',
  `code` varchar(20) DEFAULT NULL COMMENT 'Code',
  `notes` text COMMENT 'Notes',
  `t_user_id` smallint(5) unsigned NOT NULL COMMENT 'User',
  `t_datetime` datetime NOT NULL COMMENT 'Date',
  `ref_table` varchar(256) DEFAULT NULL COMMENT 'RefTable',
  `ref_id` int(10) unsigned DEFAULT NULL COMMENT 'RefId',
  PRIMARY KEY (`id`),
  KEY `debit_rec_acc_id` (`debit_rec_acc_id`),
  KEY `credit_rec_acc_id` (`credit_rec_acc_id`),
  KEY `period_id` (`period_id`,`debit_rec_acc_id`),
  CONSTRAINT `ac_tran_ibfk_1` FOREIGN KEY (`debit_rec_acc_id`) REFERENCES `ac_rec_acc` (`id`),
  CONSTRAINT `ac_tran_ibfk_2` FOREIGN KEY (`credit_rec_acc_id`) REFERENCES `ac_rec_acc` (`id`),
  CONSTRAINT `ac_tran_ibfk_3` FOREIGN KEY (`period_id`) REFERENCES `ac_period` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=268410 DEFAULT CHARSET=utf8</sql_create_table>
</table>
<table name="ac_tran_dim" view="colnames">
<left>726</left>
<top>75</top>
<width>121</width>
<height>148</height>
<sql_create_table>CREATE TABLE `ac_tran_dim` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `dim_id` smallint(5) unsigned NOT NULL COMMENT 'Dimension',
  `tran_id` int(10) unsigned NOT NULL COMMENT 'Transaction',
  `amt` decimal(10,2) unsigned DEFAULT NULL COMMENT 'Amount',
  `notes` text COMMENT 'Notes',
  PRIMARY KEY (`id`),
  KEY `fk_ac_tran` (`tran_id`),
  KEY `fk_ac_dim` (`dim_id`),
  CONSTRAINT `fk_ac_dim` FOREIGN KEY (`dim_id`) REFERENCES `ac_dim` (`id`),
  CONSTRAINT `fk_ac_tran` FOREIGN KEY (`tran_id`) REFERENCES `ac_tran` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79033 DEFAULT CHARSET=latin1</sql_create_table>
</table>
</tables>
</canvas>
</schemadesigner>
For more information send a message to info at phpclasses dot org.