Rework Company user relationships initial work started on user permissions

This commit is contained in:
johnny@pittpc.com
2021-01-29 21:28:12 -05:00
parent f2ce7a9d8d
commit 88933e09f7
10 changed files with 287 additions and 165 deletions

34
db.sql
View File

@@ -528,6 +528,25 @@ CREATE TABLE `payments` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `permissions`
--
DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `permissions` (
`permission_id` int(11) NOT NULL AUTO_INCREMENT,
`permission_level` tinyint(1) NOT NULL,
`permission_default_company` int(11) NOT NULL,
`permission_companies` varchar(500) NOT NULL,
`permission_clients` varchar(500) DEFAULT NULL,
`permission_actions` tinyint(1) DEFAULT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`permission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `products`
--
@@ -831,19 +850,6 @@ CREATE TABLE `trips` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_companies`
--
DROP TABLE IF EXISTS `user_companies`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_companies` (
`user_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_keys`
--
@@ -921,4 +927,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-01-27 14:21:51
-- Dump completed on 2021-01-29 21:26:58