add comment fields to db and extend models ticket_type and custer

This commit is contained in:
Schneider Roland 2023-03-08 07:13:32 +01:00
parent 62f6e37d14
commit 31edf22e0e
3 changed files with 53 additions and 8 deletions

View File

@ -34,14 +34,15 @@ use yii\web\IdentityInterface;
* @property string $address * @property string $address
* @property string $created_at * @property string $created_at
* @property string $updated_at * @property string $updated_at
* @property \common\models\Card card * @property \common\models\Card $card
* @property integer status * @property integer $status
* @property integer towel_count * @property integer $towel_count
* @property \common\models\User user * @property \common\models\User $user
* @property mixed bank_account * @property mixed $bank_account
* @property string password_plain * @property string $password_plain
* @property string password_hash * @property string $password_hash
* @property string auth_key * @property string $auth_key
* @property string $comment
*/ */
class Customer extends BaseFitnessActiveRecord implements IdentityInterface, RateLimitInterface class Customer extends BaseFitnessActiveRecord implements IdentityInterface, RateLimitInterface
{ {

View File

@ -29,6 +29,7 @@ use yii\helpers\ArrayHelper;
* @property string $typeHuman * @property string $typeHuman
* @property string $timeUnitHuman * @property string $timeUnitHuman
* @property string $accountName * @property string $accountName
* @property string $comment
*/ */
class TicketType extends BaseFitnessActiveRecord class TicketType extends BaseFitnessActiveRecord
{ {

View File

@ -0,0 +1,43 @@
<?php
use yii\db\Migration;
/**
* Class m230308_060353_add_customer_comment_and_ticket_type_comment
*/
class m230308_060353_add_customer_comment_and_ticket_type_comment extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn("customer", "comment", $this->string());
$this->addColumn("ticket_type", "comment", $this->string());
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
echo "m230308_060353_add_customer_comment_and_ticket_type_comment cannot be reverted.\n";
return false;
}
/*
// Use up()/down() to run migration code without a transaction.
public function up()
{
}
public function down()
{
echo "m230308_060353_add_customer_comment_and_ticket_type_comment cannot be reverted.\n";
return false;
}
*/
}