Commit 2fbe21a0 authored by Адлан Шамавов's avatar Адлан Шамавов
Browse files

STA-966 | Добавил новые модели

parent 2df6ce7d
Loading
Loading
Loading
Loading

src/Model/File.php

0 → 100644
+59 −0
Original line number Diff line number Diff line
<?php

namespace App\Model;

class File
{
    private int $id;
    private string $name;
    private string $description;
    private int $size;
    private string $type;
    private string $url;

    public function __construct(
        int $id,
        string $name,
        string $description,
        int $size,
        string $type,
        string $url
    ) {
        $this->id = $id;
        $this->name = $name;
        $this->description = $description;
        $this->size = $size;
        $this->type = $type;
        $this->url = $url;
    }

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

    public function getName(): string
    {
        return $this->name;
    }

    public function getDescription(): string
    {
        return $this->description;
    }

    public function getSize(): int
    {
        return $this->size;
    }

    public function getType(): string
    {
        return $this->type;
    }

    public function getUrl(): string
    {
        return $this->url;
    }
}
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
<?php

namespace App\Model;

class KitchenType
{
    private int $id;
    private string $name;
    private string $code;


    public function __construct(int $id, string $name, string $code)
    {
        $this->id = $id;
        $this->name = $name;
        $this->code = $code;
    }

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

    public function getName(): string
    {
        return $this->name;
    }

    public function getCode(): string
    {
        return $this->code;
    }
}
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
<?php

namespace App\Model;

class NewsCategory
{
    private int $id;
    private string $name;
    private string $code;


    public function __construct(int $id, string $name, string $code)
    {
        $this->id = $id;
        $this->name = $name;
        $this->code = $code;
    }

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

    public function getName(): string
    {
        return $this->name;
    }

    public function getCode(): string
    {
        return $this->code;
    }
}
 No newline at end of file
+83 −0
Original line number Diff line number Diff line
<?php

namespace App\Model;

class NewsDetailElement
{
    private int $id;
    private string $name;
    private string $description;
    private string $text;
    private File $image;
    private string $createAt;
    private string $seoTitle;
    private string $seoDescription;
    private string $seoKeywords;

    public function __construct(
        int    $id,
        string $name,
        string $description,
        string $text,
        File   $image,
        string $createAt,
        string $seoTitle,
        string $seoDescription,
        string $seoKeywords
    ) {
        $this->id = $id;
        $this->name = $name;
        $this->description = $description;
        $this->text = $text;
        $this->image = $image;
        $this->createAt = $createAt;
        $this->seoTitle = $seoTitle;
        $this->seoDescription = $seoDescription;
        $this->seoKeywords = $seoKeywords;
    }

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

    public function getName(): string
    {
        return $this->name;
    }

    public function getDescription(): string
    {
        return $this->description;
    }

    public function getText(): string
    {
        return $this->text;
    }

    public function getImage(): File
    {
        return $this->image;
    }

    public function getCreateAt(): string
    {
        return $this->createAt;
    }

    public function getSeoTitle(): string
    {
        return $this->seoTitle;
    }

    public function getSeoDescription(): string
    {
        return $this->seoDescription;
    }

    public function getSeoKeywords(): string
    {
        return $this->seoKeywords;
    }
}
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
<?php

namespace App\Model;

use Doctrine\Common\Collections\Collection;

class NewsFilterVariants
{
    /**
     * @var Collection<NewsCategory>
     */
    private Collection $category;

    public function __construct(Collection $category)
    {
        $this->category = $category;
    }

    public function getCategory(): Collection
    {
        return $this->category;
    }
}
 No newline at end of file
Loading