Parcourir la source

initialisation LcShopBundle

reduction
Fab il y a 4 ans
révision
4a69405488
6 fichiers modifiés avec 172 ajouts et 0 suppressions
  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 Voir le fichier


+ 10
- 0
ShopBundle/LcShopBundle.php Voir le fichier

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

namespace Lc\ShopBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class LcShopBundle extends Bundle
{

}

+ 88
- 0
ShopBundle/Model/AbstractEntity.php Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

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

namespace Lc\ShopBundle\Model;

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


interface UserInterface
{

}

Chargement…
Annuler
Enregistrer