Browse Source

initialisation LcShopBundle

reduction
Fab 4 years ago
commit
4a69405488
6 changed files with 172 additions and 0 deletions
  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 View File


+ 10
- 0
ShopBundle/LcShopBundle.php View File

<?php

namespace Lc\ShopBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class LcShopBundle extends Bundle
{

}

+ 88
- 0
ShopBundle/Model/AbstractEntity.php View File

<?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 View File

<?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 View File

<?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 View File

<?php

namespace Lc\ShopBundle\Model;

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


interface UserInterface
{

}

Loading…
Cancel
Save