Add initial app models. Add tinker as a dependency to allow use with artisan.
This commit is contained in:
committed by
Paula Quispe
parent
b8fd796e25
commit
6b8065a98f
10
app/Models/Application.php
Normal file
10
app/Models/Application.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Application extends Model
|
||||||
|
{
|
||||||
|
protected $table = "APPLICATION";
|
||||||
|
}
|
||||||
42
app/Models/Delegation.php
Normal file
42
app/Models/Delegation.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Delegation extends Model
|
||||||
|
{
|
||||||
|
protected $table = "APP_DELEGATION";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the application this delegation belongs to
|
||||||
|
*/
|
||||||
|
public function application()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Application::class, 'APP_UID', 'APP_UID');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the user this delegation belongs to
|
||||||
|
*/
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(User::class, 'USR_ID', 'USR_ID');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the process task this belongs to
|
||||||
|
*/
|
||||||
|
public function task()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Task::class, 'TAS_ID', 'TAS_ID');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the process this delegation belongs to
|
||||||
|
*/
|
||||||
|
public function process()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Process::class, 'PRO_ID', 'PRO_ID');
|
||||||
|
}
|
||||||
|
}
|
||||||
17
app/Models/Process.php
Normal file
17
app/Models/Process.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Process extends Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Retrieve all applications that belong to this process
|
||||||
|
*/
|
||||||
|
public function applications()
|
||||||
|
{
|
||||||
|
return $this->hasMany(Application::class, 'PRO_ID', 'PRO_ID');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
10
app/Models/Task.php
Normal file
10
app/Models/Task.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Task extends Model
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
19
app/Models/User.php
Normal file
19
app/Models/User.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class User extends Model
|
||||||
|
{
|
||||||
|
protected $table = "USERS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the delegations this user has (all of them)
|
||||||
|
*/
|
||||||
|
public function delegations()
|
||||||
|
{
|
||||||
|
return $this->hasMany(Delegation::class, 'USR_ID', 'USR_ID');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,7 +47,9 @@
|
|||||||
"ralouphie/getallheaders": "^2.0",
|
"ralouphie/getallheaders": "^2.0",
|
||||||
"smarty/smarty": "2.6.30",
|
"smarty/smarty": "2.6.30",
|
||||||
"pdepend/pdepend": "@stable",
|
"pdepend/pdepend": "@stable",
|
||||||
"chumper/zipper": "^1.0"
|
"chumper/zipper": "^1.0",
|
||||||
|
"nikic/php-parser": "3.1.5",
|
||||||
|
"laravel/tinker": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "^1.7",
|
"fzaninotto/faker": "^1.7",
|
||||||
|
|||||||
315
composer.lock
generated
315
composer.lock
generated
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"_readme": [
|
"_readme": [
|
||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "3242f53453d9e9a3d7fdf3a56961ae40",
|
"content-hash": "a9ba65f7fb68be7c36dd45b62216b2c6",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bshaffer/oauth2-server-php",
|
"name": "bshaffer/oauth2-server-php",
|
||||||
@@ -209,6 +209,39 @@
|
|||||||
],
|
],
|
||||||
"time": "2018-03-09T06:07:41+00:00"
|
"time": "2018-03-09T06:07:41+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "dnoegel/php-xdg-base-dir",
|
||||||
|
"version": "0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/dnoegel/php-xdg-base-dir.git",
|
||||||
|
"reference": "265b8593498b997dc2d31e75b89f053b5cc9621a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a",
|
||||||
|
"reference": "265b8593498b997dc2d31e75b89f053b5cc9621a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "@stable"
|
||||||
|
},
|
||||||
|
"type": "project",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"XdgBaseDir\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"description": "implementation of xdg base directory specification for php",
|
||||||
|
"time": "2014-10-24T07:27:01+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/inflector",
|
"name": "doctrine/inflector",
|
||||||
"version": "v1.1.0",
|
"version": "v1.1.0",
|
||||||
@@ -405,6 +438,94 @@
|
|||||||
],
|
],
|
||||||
"time": "2015-10-16T22:11:08+00:00"
|
"time": "2015-10-16T22:11:08+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "jakub-onderka/php-console-color",
|
||||||
|
"version": "v0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/JakubOnderka/PHP-Console-Color.git",
|
||||||
|
"reference": "d5deaecff52a0d61ccb613bb3804088da0307191"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191",
|
||||||
|
"reference": "d5deaecff52a0d61ccb613bb3804088da0307191",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.4.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"jakub-onderka/php-code-style": "1.0",
|
||||||
|
"jakub-onderka/php-parallel-lint": "1.0",
|
||||||
|
"jakub-onderka/php-var-dump-check": "0.*",
|
||||||
|
"phpunit/phpunit": "~4.3",
|
||||||
|
"squizlabs/php_codesniffer": "1.*"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"JakubOnderka\\PhpConsoleColor\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-2-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jakub Onderka",
|
||||||
|
"email": "jakub.onderka@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2018-09-29T17:23:10+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "jakub-onderka/php-console-highlighter",
|
||||||
|
"version": "v0.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git",
|
||||||
|
"reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547",
|
||||||
|
"reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-tokenizer": "*",
|
||||||
|
"jakub-onderka/php-console-color": "~0.2",
|
||||||
|
"php": ">=5.4.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"jakub-onderka/php-code-style": "~1.0",
|
||||||
|
"jakub-onderka/php-parallel-lint": "~1.0",
|
||||||
|
"jakub-onderka/php-var-dump-check": "~0.1",
|
||||||
|
"phpunit/phpunit": "~4.0",
|
||||||
|
"squizlabs/php_codesniffer": "~1.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"JakubOnderka\\PhpConsoleHighlighter\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jakub Onderka",
|
||||||
|
"email": "acci@acci.cz",
|
||||||
|
"homepage": "http://www.acci.cz/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Highlight PHP code in terminal",
|
||||||
|
"time": "2018-09-29T18:48:56+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v5.4.36",
|
"version": "v5.4.36",
|
||||||
@@ -534,6 +655,69 @@
|
|||||||
],
|
],
|
||||||
"time": "2017-08-30T09:26:16+00:00"
|
"time": "2017-08-30T09:26:16+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "laravel/tinker",
|
||||||
|
"version": "v1.0.8",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/laravel/tinker.git",
|
||||||
|
"reference": "cafbf598a90acde68985660e79b2b03c5609a405"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/laravel/tinker/zipball/cafbf598a90acde68985660e79b2b03c5609a405",
|
||||||
|
"reference": "cafbf598a90acde68985660e79b2b03c5609a405",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/console": "~5.1",
|
||||||
|
"illuminate/contracts": "~5.1",
|
||||||
|
"illuminate/support": "~5.1",
|
||||||
|
"php": ">=5.5.9",
|
||||||
|
"psy/psysh": "0.7.*|0.8.*|0.9.*",
|
||||||
|
"symfony/var-dumper": "~3.0|~4.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "~4.0|~5.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"illuminate/database": "The Illuminate Database package (~5.1)."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0-dev"
|
||||||
|
},
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Laravel\\Tinker\\TinkerServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Laravel\\Tinker\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Taylor Otwell",
|
||||||
|
"email": "taylor@laravel.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Powerful REPL for the Laravel framework.",
|
||||||
|
"keywords": [
|
||||||
|
"REPL",
|
||||||
|
"Tinker",
|
||||||
|
"laravel",
|
||||||
|
"psysh"
|
||||||
|
],
|
||||||
|
"time": "2018-10-12T19:39:35+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "1.0.49",
|
"version": "1.0.49",
|
||||||
@@ -923,6 +1107,57 @@
|
|||||||
],
|
],
|
||||||
"time": "2018-11-22T18:23:02+00:00"
|
"time": "2018-11-22T18:23:02+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "nikic/php-parser",
|
||||||
|
"version": "v3.1.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
|
"reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce",
|
||||||
|
"reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-tokenizer": "*",
|
||||||
|
"php": ">=5.5"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "~4.0|~5.0"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/php-parse"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"PhpParser\\": "lib/PhpParser"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nikita Popov"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A PHP parser written in PHP",
|
||||||
|
"keywords": [
|
||||||
|
"parser",
|
||||||
|
"php"
|
||||||
|
],
|
||||||
|
"time": "2018-02-28T20:30:58+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "paragonie/random_compat",
|
"name": "paragonie/random_compat",
|
||||||
"version": "v2.0.17",
|
"version": "v2.0.17",
|
||||||
@@ -1364,6 +1599,80 @@
|
|||||||
],
|
],
|
||||||
"time": "2012-12-21T11:40:51+00:00"
|
"time": "2012-12-21T11:40:51+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "psy/psysh",
|
||||||
|
"version": "v0.9.9",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/bobthecow/psysh.git",
|
||||||
|
"reference": "9aaf29575bb8293206bb0420c1e1c87ff2ffa94e"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/9aaf29575bb8293206bb0420c1e1c87ff2ffa94e",
|
||||||
|
"reference": "9aaf29575bb8293206bb0420c1e1c87ff2ffa94e",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"dnoegel/php-xdg-base-dir": "0.1",
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-tokenizer": "*",
|
||||||
|
"jakub-onderka/php-console-highlighter": "0.3.*|0.4.*",
|
||||||
|
"nikic/php-parser": "~1.3|~2.0|~3.0|~4.0",
|
||||||
|
"php": ">=5.4.0",
|
||||||
|
"symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0",
|
||||||
|
"symfony/var-dumper": "~2.7|~3.0|~4.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"bamarni/composer-bin-plugin": "^1.2",
|
||||||
|
"hoa/console": "~2.15|~3.16",
|
||||||
|
"phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
|
||||||
|
"ext-pdo-sqlite": "The doc command requires SQLite to work.",
|
||||||
|
"ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.",
|
||||||
|
"ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.",
|
||||||
|
"hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit."
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/psysh"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-develop": "0.9.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/functions.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Psy\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Justin Hileman",
|
||||||
|
"email": "justin@justinhileman.info",
|
||||||
|
"homepage": "http://justinhileman.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "An interactive shell for modern PHP.",
|
||||||
|
"homepage": "http://psysh.org",
|
||||||
|
"keywords": [
|
||||||
|
"REPL",
|
||||||
|
"console",
|
||||||
|
"interactive",
|
||||||
|
"shell"
|
||||||
|
],
|
||||||
|
"time": "2018-10-13T15:16:03+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ralouphie/getallheaders",
|
"name": "ralouphie/getallheaders",
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
@@ -4883,6 +5192,7 @@
|
|||||||
"mock",
|
"mock",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
|
"abandoned": true,
|
||||||
"time": "2017-06-30T09:13:00+00:00"
|
"time": "2017-06-30T09:13:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -5823,6 +6133,7 @@
|
|||||||
"phpcs",
|
"phpcs",
|
||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
|
"abandoned": "phpcompatibility/php-compatibility",
|
||||||
"time": "2018-10-07T17:38:02+00:00"
|
"time": "2018-10-07T17:38:02+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ return [
|
|||||||
Illuminate\Queue\QueueServiceProvider::class,
|
Illuminate\Queue\QueueServiceProvider::class,
|
||||||
Illuminate\Translation\TranslationServiceProvider::class,
|
Illuminate\Translation\TranslationServiceProvider::class,
|
||||||
|
|
||||||
|
Laravel\Tinker\TinkerServiceProvider::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'aliases' => [
|
'aliases' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user