-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
145 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 @@ | ||
{"tablename":{"value":"enlace","name":"tableName"},"tableprefix":{"value":"","name":"tablePrefix"},"modelclass":{"value":"Enlace","name":"modelClass"},"ns":{"value":"app\\models","name":"ns"},"baseclass":{"value":"yii\\db\\ActiveRecord","name":"baseClass"},"db":{"value":"db","name":"db"},"generaterelations":{"value":"all","name":"generateRelations"},"generatelabelsfromcomments":{"value":"0","name":"generateLabelsFromComments"},"generatehintsfromcomments":{"value":"1","name":"generateHintsFromComments"},"generatemodelclass":{"value":"1","name":"generateModelClass"},"generatequery":{"value":"0","name":"generateQuery"},"queryns":{"value":"app\\models","name":"queryNs"},"queryclass":{"value":"","name":"queryClass"},"querybaseclass":{"value":"yii\\db\\ActiveQuery","name":"queryBaseClass"},"enablei18n":{"value":"1","name":"enableI18N"},"singularentities":{"value":"0","name":"singularEntities"},"messagecategory":{"value":"models","name":"messageCategory"},"usetranslatablebehavior":{"value":"0","name":"useTranslatableBehavior"},"languagetablename":{"value":"{{table}}_lang","name":"languageTableName"},"languagecodecolumn":{"value":"language","name":"languageCodeColumn"},"useblameablebehavior":{"value":"0","name":"useBlameableBehavior"},"createdbycolumn":{"value":"created_by","name":"createdByColumn"},"updatedbycolumn":{"value":"updated_by","name":"updatedByColumn"},"usetimestampbehavior":{"value":"0","name":"useTimestampBehavior"},"createdatcolumn":{"value":"created_at","name":"createdAtColumn"},"updatedatcolumn":{"value":"updated_at","name":"updatedAtColumn"}} |
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,44 @@ | ||
<?php | ||
|
||
use yii\db\Migration; | ||
|
||
/** | ||
* Class m180523_130440_enlace | ||
*/ | ||
class m180523_130440_enlace extends Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeUp() | ||
{ | ||
$this->createTable('enlace', [ | ||
'id' => $this->primaryKey(), | ||
'nombre' => $this->string(255), | ||
'uri' => $this->string(255), | ||
]); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeDown() | ||
{ | ||
$this->dropTable('enlace'); | ||
} | ||
|
||
/* | ||
// Use up()/down() to run migration code without a transaction. | ||
public function up() | ||
{ | ||
} | ||
public function down() | ||
{ | ||
echo "m180523_130440_enlace cannot be reverted.\n"; | ||
return false; | ||
} | ||
*/ | ||
} |
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,34 @@ | ||
<?php | ||
|
||
namespace app\models; | ||
|
||
use Yii; | ||
use \app\models\base\Enlace as BaseEnlace; | ||
use yii\helpers\ArrayHelper; | ||
|
||
/** | ||
* This is the model class for table "enlace". | ||
*/ | ||
class Enlace extends BaseEnlace | ||
{ | ||
|
||
public function behaviors() | ||
{ | ||
return ArrayHelper::merge( | ||
parent::behaviors(), | ||
[ | ||
# custom behaviors | ||
] | ||
); | ||
} | ||
|
||
public function rules() | ||
{ | ||
return ArrayHelper::merge( | ||
parent::rules(), | ||
[ | ||
# custom validation rules | ||
] | ||
); | ||
} | ||
} |
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,55 @@ | ||
<?php | ||
// This class was automatically generated by a giiant build task | ||
// You should not change it manually as it will be overwritten on next build | ||
|
||
namespace app\models\base; | ||
|
||
use Yii; | ||
|
||
/** | ||
* This is the base-model class for table "enlace". | ||
* | ||
* @property integer $id | ||
* @property string $nombre | ||
* @property string $uri | ||
* @property string $aliasModel | ||
*/ | ||
abstract class Enlace extends \yii\db\ActiveRecord | ||
{ | ||
|
||
|
||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public static function tableName() | ||
{ | ||
return 'enlace'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function rules() | ||
{ | ||
return [ | ||
[['nombre', 'uri'], 'string', 'max' => 255] | ||
]; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function attributeLabels() | ||
{ | ||
return [ | ||
'id' => Yii::t('models', 'ID'), | ||
'nombre' => Yii::t('models', 'Nombre'), | ||
'uri' => Yii::t('models', 'Uri'), | ||
]; | ||
} | ||
|
||
|
||
|
||
|
||
} |
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