-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from KumbiaPHP/dev
Merge dev branch in master
- Loading branch information
Showing
12 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
/vendor | ||
/composer.lock | ||
/public/index.php | ||
|
||
# temp | ||
/app/temp/cache/* | ||
/app/temp/logs/* | ||
|
||
# custom configs | ||
phpunit.xml | ||
|
||
# IDEs | ||
.vscode/ | ||
.idea/ | ||
/nbproject | ||
|
||
# Mac filesystem dust | ||
.DS_Store | ||
|
||
# Windows thumbnail cache files | ||
Thumbs.db | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
-- MySQL Script generated by MySQL Workbench | ||
-- Sun May 10 19:28:53 2020 | ||
-- Model: New Model Version: 1.0 | ||
-- MySQL Workbench Forward Engineering | ||
|
||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | ||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | ||
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'; | ||
|
||
-- ----------------------------------------------------- | ||
-- Schema ku_admin | ||
-- ----------------------------------------------------- | ||
DROP SCHEMA IF EXISTS `ku_admin` ; | ||
|
||
-- ----------------------------------------------------- | ||
-- Schema ku_admin | ||
-- ----------------------------------------------------- | ||
CREATE SCHEMA IF NOT EXISTS `ku_admin` DEFAULT CHARACTER SET utf8 ; | ||
USE `ku_admin` ; | ||
|
||
-- ----------------------------------------------------- | ||
-- Table `ku_admin`.`permissions` | ||
-- ----------------------------------------------------- | ||
CREATE TABLE IF NOT EXISTS `ku_admin`.`permissions` ( | ||
`id` INT NOT NULL AUTO_INCREMENT, | ||
`roles_id` INT NOT NULL, | ||
`resources_id` INT NOT NULL, | ||
PRIMARY KEY (`id`), | ||
CONSTRAINT `fk_permissions__roles` | ||
FOREIGN KEY (`roles_id`) | ||
REFERENCES `ku_admin`.`roles` (`id`) | ||
ON DELETE NO ACTION | ||
ON UPDATE NO ACTION, | ||
CONSTRAINT `fk_permissions__resources` | ||
FOREIGN KEY (`resources_id`) | ||
REFERENCES `ku_admin`.`resources` (`id`) | ||
ON DELETE NO ACTION | ||
ON UPDATE NO ACTION) | ||
ENGINE = InnoDB; | ||
|
||
CREATE INDEX `fk_permissions_roles_idx` ON `ku_admin`.`permissions` (`roles_id` ASC); | ||
|
||
CREATE INDEX `fk_permissions_resources_idx` ON `ku_admin`.`permissions` (`resources_id` ASC); | ||
|
||
|
||
-- ----------------------------------------------------- | ||
-- Table `ku_admin`.`resources` | ||
-- ----------------------------------------------------- | ||
CREATE TABLE IF NOT EXISTS `ku_admin`.`resources` ( | ||
`id` INT NOT NULL AUTO_INCREMENT, | ||
`name` VARCHAR(127) NOT NULL, | ||
`description` VARCHAR(255) NULL, | ||
`url` VARCHAR(255) NOT NULL, | ||
`module` VARCHAR(45) NULL, | ||
`controller` VARCHAR(45) NOT NULL, | ||
`action` VARCHAR(45) NOT NULL, | ||
`status` INT NOT NULL, | ||
PRIMARY KEY (`id`)) | ||
ENGINE = InnoDB; | ||
|
||
CREATE UNIQUE INDEX `resources_name_UNIQUE` ON `ku_admin`.`resources` (`name` ASC); | ||
|
||
CREATE UNIQUE INDEX `resources_url_UNIQUE` ON `ku_admin`.`resources` (`url` ASC); | ||
|
||
|
||
-- ----------------------------------------------------- | ||
-- Table `ku_admin`.`roles` | ||
-- ----------------------------------------------------- | ||
CREATE TABLE IF NOT EXISTS `ku_admin`.`roles` ( | ||
`id` INT NOT NULL AUTO_INCREMENT, | ||
`name` VARCHAR(45) NULL, | ||
`status` INT NOT NULL, | ||
PRIMARY KEY (`id`)) | ||
ENGINE = InnoDB; | ||
|
||
|
||
-- ----------------------------------------------------- | ||
-- Table `ku_admin`.`users` | ||
-- ----------------------------------------------------- | ||
CREATE TABLE IF NOT EXISTS `ku_admin`.`users` ( | ||
`id` INT NOT NULL AUTO_INCREMENT, | ||
`email` VARCHAR(255) NOT NULL, | ||
`username` VARCHAR(45) NULL, | ||
`password` VARCHAR(255) NULL, | ||
`first_name` VARCHAR(255) NULL, | ||
`middle_name` VARCHAR(255) NULL, | ||
`last_name` VARCHAR(255) NULL, | ||
`status` INT NOT NULL, | ||
PRIMARY KEY (`id`)) | ||
ENGINE = InnoDB; | ||
|
||
CREATE UNIQUE INDEX `users_email_UNIQUE` ON `ku_admin`.`users` (`email` ASC); | ||
|
||
|
||
-- ----------------------------------------------------- | ||
-- Table `ku_admin`.`users_roles` | ||
-- ----------------------------------------------------- | ||
CREATE TABLE IF NOT EXISTS `ku_admin`.`users_roles` ( | ||
`id` INT NOT NULL AUTO_INCREMENT, | ||
`users_id` INT NOT NULL, | ||
`roles_id` INT NOT NULL, | ||
PRIMARY KEY (`id`), | ||
CONSTRAINT `fk_users_roles__users` | ||
FOREIGN KEY (`users_id`) | ||
REFERENCES `ku_admin`.`users` (`id`) | ||
ON DELETE NO ACTION | ||
ON UPDATE NO ACTION, | ||
CONSTRAINT `fk_users_roles__roles` | ||
FOREIGN KEY (`roles_id`) | ||
REFERENCES `ku_admin`.`roles` (`id`) | ||
ON DELETE NO ACTION | ||
ON UPDATE NO ACTION) | ||
ENGINE = InnoDB; | ||
|
||
CREATE INDEX `fk_users_roles_users_idx` ON `ku_admin`.`users_roles` (`users_id` ASC); | ||
|
||
CREATE INDEX `fk_users_roles_roles_idx` ON `ku_admin`.`users_roles` (`roles_id` ASC); | ||
|
||
|
||
SET SQL_MODE=@OLD_SQL_MODE; | ||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; | ||
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
/** | ||
* Parent class to use SQL with the advantages of ORM | ||
*/ | ||
abstract class LiteRecord extends \Kumbia\ActiveRecord\LiteRecord | ||
{ | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
class Permissions extends LiteRecord | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
class Resources extends LiteRecord | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
class Roles extends LiteRecord | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
class Users extends LiteRecord | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
class UsersRoles extends LiteRecord | ||
{ | ||
} |
Binary file not shown.