-
Notifications
You must be signed in to change notification settings - Fork 1
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 #23 from FrankFontcha/FF/v1
update controllers, models
- Loading branch information
Showing
76 changed files
with
6,000 additions
and
143 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,15 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIICXQIBAAKBgQCa5InOkE/fZbiMmMJqXvn4XB6tWbIN4r5Xv59Dje0nBWzKf1De | ||
lUpZcWz70Az7ZNqMpGLewwMSCLIcDMystYBnygJ5wecy0VYDuvHlJTyaiN2HiIBr | ||
/uy1Z8vMA2nnNV2XSB6sQTcAfTo5GsNt5db+pi6nf+ktBrSQdYoA0Pi2sQIDAQAB | ||
AoGABv+GXmfUxAIjiW6pcgbigl8fH7PqwIfbE7nbp0C1U0sCdE+2Rqg2GL5wLxxi | ||
ScVvvmT69peW/uyXp37IjJESwQu2uqmzEURcNA2ZLQHARqEc2wKEVkzdYtB8/FQI | ||
9o73Ya0XnzaiOFo0FoiMAHemYBUQftouMAVdejpuv1gHKXECQQDL92gq+mMZY02C | ||
rdOnKF6YInMrjoy+ThIVK86FvSBYOH9oRYk/N8akc+POgcXHDlj8ZkF/RZBxNog9 | ||
XgbcvhENAkEAwmg8sdYpmN6IEZmFsoi+47hjhpZUYnOcKF1Y9f+NM/QENSffdmrd | ||
0dHw89nR/uUHPEcm6qzuf2cR0u6yj0orNQJBALLVAGM2V+8pjws1x243SgEPq3UU | ||
LjipENe5KgE+mn5fQu40kap5B9Smu6UTSUpHPSRHr8OcRZHN41QS/edLSn0CQF/6 | ||
HDTj+WdaPa0KsSHiNvOv3Zrdbs2oK+kVpMzWHH0QtF8Vz1HkEpz6281XtT/1DCxr | ||
KEBlnd1SIk+Tvp3VTR0CQQCLCOHw+JFne6PyzgYSak6GlznSe2ZSq18wISpzHtg8 | ||
jzQqKzSAJGgzJlSPb1FT6xhkmKKho9+b265E+AOD8ZRf | ||
-----END RSA PRIVATE KEY----- |
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,6 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCa5InOkE/fZbiMmMJqXvn4XB6t | ||
WbIN4r5Xv59Dje0nBWzKf1DelUpZcWz70Az7ZNqMpGLewwMSCLIcDMystYBnygJ5 | ||
wecy0VYDuvHlJTyaiN2HiIBr/uy1Z8vMA2nnNV2XSB6sQTcAfTo5GsNt5db+pi6n | ||
f+ktBrSQdYoA0Pi2sQIDAQAB | ||
-----END PUBLIC KEY----- |
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,62 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class CreateActivities extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('activities'); | ||
|
||
// title | ||
$table->addColumn("name", "string", [ | ||
"limit" => 255, | ||
"null" => false | ||
]); | ||
|
||
// description | ||
$table->addColumn("description", "string", [ | ||
"limit" => 255, | ||
"null" => true | ||
]); | ||
|
||
// reference | ||
$table->addColumn("reference", "string", [ | ||
"limit" => 255, | ||
"null" => true | ||
]); | ||
|
||
// activity type_id | ||
$table->addColumn("activity_type_id", "integer", [ | ||
"null" => false | ||
]); | ||
|
||
// status | ||
$table->addColumn("status", "enum", [ | ||
"values" => ["0", "1", "2"], // 0 disable, 1 enable, 2 delete | ||
"default" => "1" | ||
]); | ||
|
||
// created_at | ||
$table->addColumn("created_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
// updated_at | ||
$table->addColumn("updated_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
$table->addIndex(['name', 'reference'], [ 'unique' => true ]); | ||
|
||
$table->create(); | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
config/Migrations/20230224070413_CreateActivityMetadatas.php
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,66 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class CreateActivityMetadatas extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('activity_metadatas'); | ||
|
||
// activity_id | ||
$table->addColumn("activity_id", "integer", [ | ||
"null" => false | ||
]); | ||
|
||
// metakey | ||
$table->addColumn("metakey", "string", [ | ||
"limit" => 255, | ||
"null" => false | ||
]); | ||
|
||
// metavalue | ||
$table->addColumn("metavalue", "string", [ | ||
"limit" => 1000, | ||
"null" => false | ||
]); | ||
|
||
// extra data | ||
$table->addColumn("extra", "string", [ | ||
"limit" => 1000, | ||
"null" => true | ||
]); | ||
|
||
// unicity | ||
$table->addColumn("unicity", "enum", [ | ||
"values" => ["0", "1"], // 0 multiple type key, 1 unique key | ||
"default" => "1" | ||
]); | ||
|
||
// status | ||
$table->addColumn("status", "enum", [ | ||
"values" => ["0", "1", "2"], // 0 disable, 1 enable, 2 delete | ||
"default" => "1" | ||
]); | ||
|
||
// created_at | ||
$table->addColumn("created_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
// updated_at | ||
$table->addColumn("updated_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
$table->create(); | ||
} | ||
} |
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,86 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class CreateModules extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('modules'); | ||
|
||
// title | ||
$table->addColumn("name", "string", [ | ||
"limit" => 255, | ||
"null" => false | ||
]); | ||
|
||
// description | ||
$table->addColumn("description", "string", [ | ||
"limit" => 255, | ||
"null" => true | ||
]); | ||
|
||
// reference | ||
$table->addColumn("reference", "string", [ | ||
"limit" => 255, | ||
"null" => true | ||
]); | ||
|
||
// activity_id | ||
$table->addColumn("activity_id", "integer", [ | ||
"null" => false | ||
]); | ||
|
||
// price | ||
$table->addColumn("price", "integer", [ | ||
"null" => false, | ||
"default" => 0 | ||
]); | ||
|
||
// price range | ||
$table->addColumn("price_range", "integer", [ | ||
"null" => false, | ||
"default" => 1 | ||
]); | ||
|
||
// validity | ||
$table->addColumn("validity", "enum", [ | ||
"values" => ["minutes", "hours", "days", "weeks", "months", "years"], | ||
"default" => "months", | ||
"null" => false | ||
]); | ||
|
||
// currency_id | ||
$table->addColumn("currency_id", "integer", [ | ||
"null" => false | ||
]); | ||
|
||
// status | ||
$table->addColumn("status", "enum", [ | ||
"values" => ["0", "1", "2"], // 0 disable, 1 enable, 2 delete | ||
"default" => "1" | ||
]); | ||
|
||
// created_at | ||
$table->addColumn("created_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
// updated_at | ||
$table->addColumn("updated_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
$table->addIndex(['reference'], [ 'unique' => true ]); | ||
|
||
$table->create(); | ||
} | ||
} |
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,51 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class CreateActivityTypes extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('activity_types'); | ||
|
||
// title | ||
$table->addColumn("name", "string", [ | ||
"limit" => 255, | ||
"null" => false | ||
]); | ||
|
||
// description | ||
$table->addColumn("description", "string", [ | ||
"limit" => 255, | ||
"null" => true | ||
]); | ||
|
||
// status | ||
$table->addColumn("status", "enum", [ | ||
"values" => ["0", "1", "2"], // 0 disable, 1 enable, 2 delete | ||
"default" => "1" | ||
]); | ||
|
||
// created_at | ||
$table->addColumn("created_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
// updated_at | ||
$table->addColumn("updated_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
$table->addIndex(['name'], [ 'unique' => true ]); | ||
|
||
$table->create(); | ||
} | ||
} |
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,63 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class CreateCurrencies extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('currencies'); | ||
|
||
// shortname | ||
$table->addColumn("shortname", "string", [ | ||
"limit" => 255, | ||
"null" => false | ||
]); | ||
|
||
// longname | ||
$table->addColumn("longname", "string", [ | ||
"limit" => 255, | ||
"null" => false | ||
]); | ||
|
||
// symbol | ||
$table->addColumn("symbol", "string", [ | ||
"limit" => 255, | ||
"null" => false | ||
]); | ||
|
||
// icon | ||
$table->addColumn("icon", "string", [ | ||
"limit" => 1000, | ||
"null" => false | ||
]); | ||
|
||
// status | ||
$table->addColumn("status", "enum", [ | ||
"values" => ["0", "1", "2"], // 0 disable, 1 enable, 2 delete | ||
"default" => "1" | ||
]); | ||
|
||
// created_at | ||
$table->addColumn("created_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
// updated_at | ||
$table->addColumn("updated_at", "timestamp", [ | ||
"default" => 'CURRENT_TIMESTAMP' | ||
]); | ||
|
||
$table->addIndex(['shortname', 'longname', 'symbol'], [ 'unique' => true ]); | ||
|
||
$table->create(); | ||
} | ||
} |
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,20 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class CreateFolders extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('folders'); | ||
$table->create(); | ||
} | ||
} |
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
Oops, something went wrong.