Bladeren bron

initialisation LcShopBundle

reduction
Fab 4 jaren geleden
commit
4a69405488
6 gewijzigde bestanden met toevoegingen van 172 en 0 verwijderingen
  1. +0
    -0
      README.md
  2. +10
    -0
      ShopBundle/LcShopBundle.php
  3. +88
    -0
      ShopBundle/Model/AbstractEntity.php
  4. +15
    -0
      ShopBundle/Model/Merchant.php
  5. +47
    -0
      ShopBundle/Model/TaxRate.php
  6. +12
    -0
      ShopBundle/Model/UserInterface.php

+ 0
- 0
README.md Bestand weergeven


+ 10
- 0
ShopBundle/LcShopBundle.php Bestand weergeven

@@ -0,0 +1,10 @@
<?php

namespace Lc\ShopBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class LcShopBundle extends Bundle
{

}

+ 88
- 0
ShopBundle/Model/AbstractEntity.php Bestand weergeven

@@ -0,0 +1,88 @@
<?php

namespace Lc\ShopBundle\Model;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
* @ORM\MappedSuperclass
*/
abstract class AbstractEntity
{

/**
* @ORM\Column(type="datetime")
* @Gedmo\Timestampable(on="create")
*/
protected $createdAt;

/**
* @ORM\Column(type="datetime")
* @Gedmo\Timestampable(on="update")
*/
protected $updatedAt;

/**
* @ORM\ManyToOne(targetEntity="UserInterface")
* @ORM\JoinColumn(nullable=false)
*/
protected $createdBy;

/**
* @ORM\ManyToOne(targetEntity="UserInterface")
* @ORM\JoinColumn(nullable=false)
*/
protected $updatedBy;


public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}

public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;

return $this;
}

public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}

public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;

return $this;
}

public function getCreatedBy(): ?UserInterface
{
return $this->createdBy;
}

public function setCreatedBy(?UserInterface $createdBy): self
{
$this->createdBy = $createdBy;

return $this;
}

public function getUpdatedBy(): ?UserInterface
{
return $this->updatedBy;
}

public function setUpdatedBy(?UserInterface $updatedBy): self
{
$this->updatedBy = $updatedBy;

return $this;
}


}

+ 15
- 0
ShopBundle/Model/Merchant.php Bestand weergeven

@@ -0,0 +1,15 @@
<?php

namespace Lc\ShopBundle\Model;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
* @ORM\MappedSuperclass()
*/

class Merchant
{

}

+ 47
- 0
ShopBundle/Model/TaxRate.php Bestand weergeven

@@ -0,0 +1,47 @@
<?php

namespace Lc\ShopBundle\Model;

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\MappedSuperclass()
*/
abstract class TaxRate extends AbstractEntity
{

/**
* @ORM\Column(type="string", length=255)
*/
protected $title;

/**
* @ORM\Column(type="float")
*/
protected $value;


public function getTitle(): ?string
{
return $this->title;
}

public function setTitle(string $title): self
{
$this->title = $title;

return $this;
}

public function getValue(): ?float
{
return $this->value;
}

public function setValue(float $value): self
{
$this->value = $value;

return $this;
}
}

+ 12
- 0
ShopBundle/Model/UserInterface.php Bestand weergeven

@@ -0,0 +1,12 @@
<?php

namespace Lc\ShopBundle\Model;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;


interface UserInterface
{

}

Laden…
Annuleren
Opslaan