/
uchi-pro
/
api-client-php
Обзор
Документация
Войти
/
uchi-pro
/
api-client-php
Код
Запросы
0
Пакеты
0
Релизы
3
Аналитика
2.1.0
src/Courses/Course.php
115 строк
1 KB
Andrey Gladyshev
feat(courses): в свойства курса добавить вендора-владельца курса
22 май 2022, 19:10
22 май 2022, 19:10
f9e7565
Код
Авторство
О чём код?
<?php declare(strict_types=1); namespace UchiPro\Courses; use DateTimeImmutable; use UchiPro\Users\User; use UchiPro\Vendors\Vendor; class Course { /** * @var string */ public $id; /** * @var string */ public $gid; /** * @var DateTimeImmutable */ public $createdAt; /** * @var DateTimeImmutable */ public $updatedAt; /** * @var DateTimeImmutable */ public $deletedAt; /** * @var bool */ public $isActive; /** * @var User */ public $author; /** * @var string */ public $title; /** * @var string */ public $description; /** * @var string */ public $comments; /** * @var string */ public $parentId; /** * @var CourseType */ public $type; /** * @var int */ public $hours; /** * @var int */ public $price; /** * @var int */ public $depth = 0; /** * @var int */ public $childrenCount = 0; /** * @var int */ public $lessonsCount = 0; /** * @var AcademicPlan\Plan */ public $academicPlan; /** * @var Vendor */ public $vendor; public static function create(string $id = null, string $title = null): Course { $course = new self(); $course->id = $id; $course->title = $title; return $course; } }