add comment fields to db and extend models ticket_type and custer
This commit is contained in:
parent
62f6e37d14
commit
31edf22e0e
@ -34,14 +34,15 @@ use yii\web\IdentityInterface;
|
||||
* @property string $address
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
* @property \common\models\Card card
|
||||
* @property integer status
|
||||
* @property integer towel_count
|
||||
* @property \common\models\User user
|
||||
* @property mixed bank_account
|
||||
* @property string password_plain
|
||||
* @property string password_hash
|
||||
* @property string auth_key
|
||||
* @property \common\models\Card $card
|
||||
* @property integer $status
|
||||
* @property integer $towel_count
|
||||
* @property \common\models\User $user
|
||||
* @property mixed $bank_account
|
||||
* @property string $password_plain
|
||||
* @property string $password_hash
|
||||
* @property string $auth_key
|
||||
* @property string $comment
|
||||
*/
|
||||
class Customer extends BaseFitnessActiveRecord implements IdentityInterface, RateLimitInterface
|
||||
{
|
||||
|
||||
@ -29,6 +29,7 @@ use yii\helpers\ArrayHelper;
|
||||
* @property string $typeHuman
|
||||
* @property string $timeUnitHuman
|
||||
* @property string $accountName
|
||||
* @property string $comment
|
||||
*/
|
||||
class TicketType extends BaseFitnessActiveRecord
|
||||
{
|
||||
|
||||
@ -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;
|
||||
}
|
||||
*/
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user