Skip to content

Commit

Permalink
Test add new field
Browse files Browse the repository at this point in the history
  • Loading branch information
Bukashk0zzz committed Dec 11, 2017
1 parent 06fbe19 commit 90f4098
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ script:
- php bin/console doctrine:database:create -n
- php bin/console doctrine:schema:create -n
- php bin/console doctrine:schema:update --dump-sql
- php bin/console doctrine:schema:validate -n
- rm src/Entity/Admin.php
- mv AdminEdited.php src/Entity/Admin.php
- php bin/console doctrine:migrations:diff -n
- php bin/console doctrine:migrations:migrate -n
- php bin/console doctrine:schema:validate -n
Expand Down
133 changes: 133 additions & 0 deletions AdminEdited.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?php declare(strict_types = 1);

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
* Admin
*
* @ORM\Table(name="admins")
* @ORM\Entity()
*/
class Admin
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned": true})
* @ORM\Id()
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;

/**
* @var string
*
* @ORM\Column(name="login", type="string", length=255, nullable=true)
*/
private $login;

/**
* @var string
*
* @ORM\Column(name="password", type="string", length=255, nullable=true)
*/
private $password;

/**
* @var string
*
* @ORM\Column(name="about", type="string", length=255, nullable=true)
*/
private $about;

/**
* @var bool
*
* @ORM\Column(name="status", type="boolean", nullable=false, options={"default" : "1"})
*/
private $status = true;

/**
* Get id
*
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* Set login
*
* @param string $login
*
* @return Admin
*/
public function setLogin(string $login): Admin
{
$this->login = $login;

return $this;
}

/**
* Get login
*
* @return string
*/
public function getLogin(): string
{
return $this->login;
}

/**
* Set password
*
* @param string $password
*
* @return Admin
*/
public function setPassword(string $password): Admin
{
$this->password = $password;

return $this;
}

/**
* Get password
*
* @return string
*/
public function getPassword(): string
{
return $this->password;
}

/**
* Set status
*
* @param bool $status
*
* @return Admin
*/
public function setStatus(bool $status): Admin
{
$this->status = $status;

return $this;
}

/**
* Get status
*
* @return bool
*/
public function getStatus(): bool
{
return $this->status;
}
}
2 changes: 1 addition & 1 deletion src/Entity/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Admin
/**
* @var bool
*
* @ORM\Column(name="status", type="boolean", nullable=false, options={"unsigned": true, "default" : "1"})
* @ORM\Column(name="status", type="boolean", nullable=false, options={"default" : "1"})
*/
private $status = true;

Expand Down

0 comments on commit 90f4098

Please sign in to comment.