<?php
namespace App\AppBundle\MainBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use JsonSerializable;
/**
* AddOns
*
* @ORM\Entity
* @ORM\Table(name="user_stripe_details")
* @ORM\HasLifecycleCallbacks()
*/
class User_Stripe_Details implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var User
* @ORM\OneToOne(targetEntity="User", inversedBy="user_stripe_details")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private $user;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $business_name;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $mcc;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $country;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $email;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $is_stripe_integration_started;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $is_stripe_integration_completed;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $accountNumber;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $stripeCustomer;
/**
* @var bool
* @ORM\Column(type="boolean", nullable=true)
*/
private $payout_enabled = false;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* @param User $user
*/
public function setUser(User $user)
{
$this->user = $user;
}
/**
* @return mixed
*/
public function getBusinessName()
{
return $this->business_name;
}
/**
* @param mixed $business_name
*/
public function setBusinessName($business_name)
{
$this->business_name = $business_name;
}
/**
* @return mixed
*/
public function getEmail()
{
return $this->email;
}
/**
* @param mixed $email
*/
public function setEmail($email)
{
$this->email = $email;
}
/**
* @return mixed
*/
public function getIsStripeIntegrationStarted()
{
return $this->is_stripe_integration_started;
}
/**
* @param mixed $is_stripe_integration_started
*/
public function setIsStripeIntegrationStarted($is_stripe_integration_started)
{
$this->is_stripe_integration_started = $is_stripe_integration_started;
}
/**
* @return mixed
*/
public function getIsStripeIntegrationCompleted()
{
return $this->is_stripe_integration_completed;
}
/**
* @param mixed $is_stripe_integration_completed
*/
public function setIsStripeIntegrationCompleted($is_stripe_integration_completed)
{
$this->is_stripe_integration_completed = $is_stripe_integration_completed;
}
/**
* @return string
*/
public function getAccountNumber()
{
return $this->accountNumber;
}
/**
* @param string $accountNumber
*/
public function setAccountNumber($accountNumber)
{
$this->accountNumber = $accountNumber;
}
/**
* @return string
*/
public function getStripeCustomer()
{
return $this->stripeCustomer;
}
/**
* @param string $stripeCustomer
*/
public function setStripeCustomer($stripeCustomer)
{
$this->stripeCustomer = $stripeCustomer;
}
/**
* @return bool
*/
public function isPayoutEnabled()
{
return $this->payout_enabled;
}
/**
* @param bool $payout_enabled
*/
public function setPayoutEnabled($payout_enabled)
{
$this->payout_enabled = $payout_enabled;
}
/**
* @return string
*/
public function getCountry()
{
return $this->country;
}
/**
* @param string $country
*/
public function setCountry($country)
{
$this->country = $country;
}
/**
* @return mixed
*/
public function getMcc()
{
return $this->mcc;
}
/**
* @param mixed $mcc
*/
public function setMcc($mcc)
{
$this->mcc = $mcc;
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
'business_name' => $this->business_name,
'mcc' => $this->mcc,
'country' => $this->country,
'email' => $this->email,
'accountNumber' => $this->accountNumber,
'stripeCustomer' => $this->stripeCustomer,
'is_stripe_integration_completed' => $this->is_stripe_integration_completed,
'is_stripe_integration_started' => $this->is_stripe_integration_started,
'created' => $this->createdAt->format('Y-m-d H:i:s'),
'updated' => $this->updatedAt->format('Y-m-d H:i:s'),
'payout_enabled' => $this->payout_enabled,
);
}
/**
* @var \DateTime $created
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
protected $createdAt;
/**
* @var \DateTime $updated
*
* @ORM\Column(name="updated_at", type="datetime", nullable=false)
*/
protected $updatedAt;
public function getCreatedAt()
{
return $this->createdAt;
}
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function updatedTimestamps()
{
$this->setUpdatedAt(new \DateTime());
if ($this->getCreatedAt() === null) {
$this->setCreatedAt(new \DateTime());
}
}
public function __construct() {
$this->setCreatedAt(new \DateTime());
}
}