Course.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. <?php
  2. namespace Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. /**
  6. * Course
  7. *
  8. * @ORM\Table(name="course")
  9. * @ORM\Entity(repositoryClass="Entity\Repository\CourseRepository")
  10. */
  11. class Course
  12. {
  13. /**
  14. * @var integer
  15. *
  16. * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  17. * @ORM\Id
  18. * @ORM\GeneratedValue(strategy="IDENTITY")
  19. */
  20. private $id;
  21. /**
  22. * @var string
  23. *
  24. * @ORM\Column(name="code", type="string", length=40, precision=0, scale=0, nullable=false, unique=false)
  25. */
  26. private $code;
  27. /**
  28. * @var string
  29. *
  30. * @ORM\Column(name="directory", type="string", length=40, precision=0, scale=0, nullable=true, unique=false)
  31. */
  32. private $directory;
  33. /**
  34. * @var string
  35. *
  36. * @ORM\Column(name="db_name", type="string", length=40, precision=0, scale=0, nullable=true, unique=false)
  37. */
  38. private $dbName;
  39. /**
  40. * @var string
  41. *
  42. * @ORM\Column(name="course_language", type="string", length=20, precision=0, scale=0, nullable=true, unique=false)
  43. */
  44. private $courseLanguage;
  45. /**
  46. * @var string
  47. *
  48. * @ORM\Column(name="title", type="string", length=250, precision=0, scale=0, nullable=true, unique=false)
  49. */
  50. private $title;
  51. /**
  52. * @var string
  53. *
  54. * @ORM\Column(name="description", type="text", precision=0, scale=0, nullable=true, unique=false)
  55. */
  56. private $description;
  57. /**
  58. * @var string
  59. *
  60. * @ORM\Column(name="category_code", type="string", length=40, precision=0, scale=0, nullable=true, unique=false)
  61. */
  62. private $categoryCode;
  63. /**
  64. * @var boolean
  65. *
  66. * @ORM\Column(name="visibility", type="boolean", precision=0, scale=0, nullable=true, unique=false)
  67. */
  68. private $visibility;
  69. /**
  70. * @var integer
  71. *
  72. * @ORM\Column(name="show_score", type="integer", precision=0, scale=0, nullable=false, unique=false)
  73. */
  74. private $showScore;
  75. /**
  76. * @var string
  77. *
  78. * @ORM\Column(name="tutor_name", type="string", length=200, precision=0, scale=0, nullable=true, unique=false)
  79. */
  80. private $tutorName;
  81. /**
  82. * @var string
  83. *
  84. * @ORM\Column(name="visual_code", type="string", length=40, precision=0, scale=0, nullable=true, unique=false)
  85. */
  86. private $visualCode;
  87. /**
  88. * @var string
  89. *
  90. * @ORM\Column(name="department_name", type="string", length=30, precision=0, scale=0, nullable=true, unique=false)
  91. */
  92. private $departmentName;
  93. /**
  94. * @var string
  95. *
  96. * @ORM\Column(name="department_url", type="string", length=180, precision=0, scale=0, nullable=true, unique=false)
  97. */
  98. private $departmentUrl;
  99. /**
  100. * @var integer
  101. *
  102. * @ORM\Column(name="disk_quota", type="bigint", precision=0, scale=0, nullable=true, unique=false)
  103. */
  104. private $diskQuota;
  105. /**
  106. * @var \DateTime
  107. *
  108. * @ORM\Column(name="last_visit", type="datetime", precision=0, scale=0, nullable=true, unique=false)
  109. */
  110. private $lastVisit;
  111. /**
  112. * @var \DateTime
  113. *
  114. * @ORM\Column(name="last_edit", type="datetime", precision=0, scale=0, nullable=true, unique=false)
  115. */
  116. private $lastEdit;
  117. /**
  118. * @var \DateTime
  119. *
  120. * @ORM\Column(name="creation_date", type="datetime", precision=0, scale=0, nullable=true, unique=false)
  121. */
  122. private $creationDate;
  123. /**
  124. * @var \DateTime
  125. *
  126. * @ORM\Column(name="expiration_date", type="datetime", precision=0, scale=0, nullable=true, unique=false)
  127. */
  128. private $expirationDate;
  129. /**
  130. * @var string
  131. *
  132. * @ORM\Column(name="target_course_code", type="string", length=40, precision=0, scale=0, nullable=true, unique=false)
  133. */
  134. private $targetCourseCode;
  135. /**
  136. * @var boolean
  137. *
  138. * @ORM\Column(name="subscribe", type="boolean", precision=0, scale=0, nullable=false, unique=false)
  139. */
  140. private $subscribe;
  141. /**
  142. * @var boolean
  143. *
  144. * @ORM\Column(name="unsubscribe", type="boolean", precision=0, scale=0, nullable=false, unique=false)
  145. */
  146. private $unsubscribe;
  147. /**
  148. * @var string
  149. *
  150. * @ORM\Column(name="registration_code", type="string", length=255, precision=0, scale=0, nullable=false, unique=false)
  151. */
  152. private $registrationCode;
  153. /**
  154. * @var string
  155. *
  156. * @ORM\Column(name="legal", type="text", precision=0, scale=0, nullable=false, unique=false)
  157. */
  158. private $legal;
  159. /**
  160. * @var integer
  161. *
  162. * @ORM\Column(name="activate_legal", type="integer", precision=0, scale=0, nullable=false, unique=false)
  163. */
  164. private $activateLegal;
  165. /**
  166. * @var integer
  167. *
  168. * @ORM\Column(name="course_type_id", type="integer", precision=0, scale=0, nullable=true, unique=false)
  169. */
  170. private $courseTypeId;
  171. /**
  172. * @ORM\OneToMany(targetEntity="CourseRelUser", mappedBy="course")
  173. **/
  174. private $users;
  175. /**
  176. * @ORM\OneToMany(targetEntity="CItemProperty", mappedBy="course")
  177. **/
  178. private $items;
  179. /**
  180. * @ORM\OneToMany(targetEntity="CurriculumCategory", mappedBy="course")
  181. **/
  182. //private $curriculumCategories;
  183. public function __construct()
  184. {
  185. $this->users = new ArrayCollection();
  186. $this->items = new ArrayCollection();
  187. }
  188. /**
  189. * @return ArrayCollection
  190. */
  191. public function getItems()
  192. {
  193. return $this->items;
  194. }
  195. /**
  196. * @return ArrayCollection
  197. */
  198. public function getUsers()
  199. {
  200. return $this->users;
  201. }
  202. /**
  203. * Get id
  204. *
  205. * @return integer
  206. */
  207. public function getId()
  208. {
  209. return $this->id;
  210. }
  211. /**
  212. * Set code
  213. *
  214. * @param string $code
  215. * @return Course
  216. */
  217. public function setCode($code)
  218. {
  219. $this->code = $code;
  220. return $this;
  221. }
  222. /**
  223. * Get code
  224. *
  225. * @return string
  226. */
  227. public function getCode()
  228. {
  229. return $this->code;
  230. }
  231. /**
  232. * Set directory
  233. *
  234. * @param string $directory
  235. * @return Course
  236. */
  237. public function setDirectory($directory)
  238. {
  239. $this->directory = $directory;
  240. return $this;
  241. }
  242. /**
  243. * Get directory
  244. *
  245. * @return string
  246. */
  247. public function getDirectory()
  248. {
  249. return $this->directory;
  250. }
  251. /**
  252. * Set dbName
  253. *
  254. * @param string $dbName
  255. * @return Course
  256. */
  257. public function setDbName($dbName)
  258. {
  259. $this->dbName = $dbName;
  260. return $this;
  261. }
  262. /**
  263. * Get dbName
  264. *
  265. * @return string
  266. */
  267. public function getDbName()
  268. {
  269. return $this->dbName;
  270. }
  271. /**
  272. * Set courseLanguage
  273. *
  274. * @param string $courseLanguage
  275. * @return Course
  276. */
  277. public function setCourseLanguage($courseLanguage)
  278. {
  279. $this->courseLanguage = $courseLanguage;
  280. return $this;
  281. }
  282. /**
  283. * Get courseLanguage
  284. *
  285. * @return string
  286. */
  287. public function getCourseLanguage()
  288. {
  289. return $this->courseLanguage;
  290. }
  291. /**
  292. * Set title
  293. *
  294. * @param string $title
  295. * @return Course
  296. */
  297. public function setTitle($title)
  298. {
  299. $this->title = $title;
  300. return $this;
  301. }
  302. /**
  303. * Get title
  304. *
  305. * @return string
  306. */
  307. public function getTitle()
  308. {
  309. return $this->title;
  310. }
  311. /**
  312. * Set description
  313. *
  314. * @param string $description
  315. * @return Course
  316. */
  317. public function setDescription($description)
  318. {
  319. $this->description = $description;
  320. return $this;
  321. }
  322. /**
  323. * Get description
  324. *
  325. * @return string
  326. */
  327. public function getDescription()
  328. {
  329. return $this->description;
  330. }
  331. /**
  332. * Set categoryCode
  333. *
  334. * @param string $categoryCode
  335. * @return Course
  336. */
  337. public function setCategoryCode($categoryCode)
  338. {
  339. $this->categoryCode = $categoryCode;
  340. return $this;
  341. }
  342. /**
  343. * Get categoryCode
  344. *
  345. * @return string
  346. */
  347. public function getCategoryCode()
  348. {
  349. return $this->categoryCode;
  350. }
  351. /**
  352. * Set visibility
  353. *
  354. * @param boolean $visibility
  355. * @return Course
  356. */
  357. public function setVisibility($visibility)
  358. {
  359. $this->visibility = $visibility;
  360. return $this;
  361. }
  362. /**
  363. * Get visibility
  364. *
  365. * @return boolean
  366. */
  367. public function getVisibility()
  368. {
  369. return $this->visibility;
  370. }
  371. /**
  372. * Set showScore
  373. *
  374. * @param integer $showScore
  375. * @return Course
  376. */
  377. public function setShowScore($showScore)
  378. {
  379. $this->showScore = $showScore;
  380. return $this;
  381. }
  382. /**
  383. * Get showScore
  384. *
  385. * @return integer
  386. */
  387. public function getShowScore()
  388. {
  389. return $this->showScore;
  390. }
  391. /**
  392. * Set tutorName
  393. *
  394. * @param string $tutorName
  395. * @return Course
  396. */
  397. public function setTutorName($tutorName)
  398. {
  399. $this->tutorName = $tutorName;
  400. return $this;
  401. }
  402. /**
  403. * Get tutorName
  404. *
  405. * @return string
  406. */
  407. public function getTutorName()
  408. {
  409. return $this->tutorName;
  410. }
  411. /**
  412. * Set visualCode
  413. *
  414. * @param string $visualCode
  415. * @return Course
  416. */
  417. public function setVisualCode($visualCode)
  418. {
  419. $this->visualCode = $visualCode;
  420. return $this;
  421. }
  422. /**
  423. * Get visualCode
  424. *
  425. * @return string
  426. */
  427. public function getVisualCode()
  428. {
  429. return $this->visualCode;
  430. }
  431. /**
  432. * Set departmentName
  433. *
  434. * @param string $departmentName
  435. * @return Course
  436. */
  437. public function setDepartmentName($departmentName)
  438. {
  439. $this->departmentName = $departmentName;
  440. return $this;
  441. }
  442. /**
  443. * Get departmentName
  444. *
  445. * @return string
  446. */
  447. public function getDepartmentName()
  448. {
  449. return $this->departmentName;
  450. }
  451. /**
  452. * Set departmentUrl
  453. *
  454. * @param string $departmentUrl
  455. * @return Course
  456. */
  457. public function setDepartmentUrl($departmentUrl)
  458. {
  459. $this->departmentUrl = $departmentUrl;
  460. return $this;
  461. }
  462. /**
  463. * Get departmentUrl
  464. *
  465. * @return string
  466. */
  467. public function getDepartmentUrl()
  468. {
  469. return $this->departmentUrl;
  470. }
  471. /**
  472. * Set diskQuota
  473. *
  474. * @param integer $diskQuota
  475. * @return Course
  476. */
  477. public function setDiskQuota($diskQuota)
  478. {
  479. $this->diskQuota = $diskQuota;
  480. return $this;
  481. }
  482. /**
  483. * Get diskQuota
  484. *
  485. * @return integer
  486. */
  487. public function getDiskQuota()
  488. {
  489. return $this->diskQuota;
  490. }
  491. /**
  492. * Set lastVisit
  493. *
  494. * @param \DateTime $lastVisit
  495. * @return Course
  496. */
  497. public function setLastVisit($lastVisit)
  498. {
  499. $this->lastVisit = $lastVisit;
  500. return $this;
  501. }
  502. /**
  503. * Get lastVisit
  504. *
  505. * @return \DateTime
  506. */
  507. public function getLastVisit()
  508. {
  509. return $this->lastVisit;
  510. }
  511. /**
  512. * Set lastEdit
  513. *
  514. * @param \DateTime $lastEdit
  515. * @return Course
  516. */
  517. public function setLastEdit($lastEdit)
  518. {
  519. $this->lastEdit = $lastEdit;
  520. return $this;
  521. }
  522. /**
  523. * Get lastEdit
  524. *
  525. * @return \DateTime
  526. */
  527. public function getLastEdit()
  528. {
  529. return $this->lastEdit;
  530. }
  531. /**
  532. * Set creationDate
  533. *
  534. * @param \DateTime $creationDate
  535. * @return Course
  536. */
  537. public function setCreationDate($creationDate)
  538. {
  539. $this->creationDate = $creationDate;
  540. return $this;
  541. }
  542. /**
  543. * Get creationDate
  544. *
  545. * @return \DateTime
  546. */
  547. public function getCreationDate()
  548. {
  549. return $this->creationDate;
  550. }
  551. /**
  552. * Set expirationDate
  553. *
  554. * @param \DateTime $expirationDate
  555. * @return Course
  556. */
  557. public function setExpirationDate($expirationDate)
  558. {
  559. $this->expirationDate = $expirationDate;
  560. return $this;
  561. }
  562. /**
  563. * Get expirationDate
  564. *
  565. * @return \DateTime
  566. */
  567. public function getExpirationDate()
  568. {
  569. return $this->expirationDate;
  570. }
  571. /**
  572. * Set targetCourseCode
  573. *
  574. * @param string $targetCourseCode
  575. * @return Course
  576. */
  577. public function setTargetCourseCode($targetCourseCode)
  578. {
  579. $this->targetCourseCode = $targetCourseCode;
  580. return $this;
  581. }
  582. /**
  583. * Get targetCourseCode
  584. *
  585. * @return string
  586. */
  587. public function getTargetCourseCode()
  588. {
  589. return $this->targetCourseCode;
  590. }
  591. /**
  592. * Set subscribe
  593. *
  594. * @param boolean $subscribe
  595. * @return Course
  596. */
  597. public function setSubscribe($subscribe)
  598. {
  599. $this->subscribe = $subscribe;
  600. return $this;
  601. }
  602. /**
  603. * Get subscribe
  604. *
  605. * @return boolean
  606. */
  607. public function getSubscribe()
  608. {
  609. return $this->subscribe;
  610. }
  611. /**
  612. * Set unsubscribe
  613. *
  614. * @param boolean $unsubscribe
  615. * @return Course
  616. */
  617. public function setUnsubscribe($unsubscribe)
  618. {
  619. $this->unsubscribe = $unsubscribe;
  620. return $this;
  621. }
  622. /**
  623. * Get unsubscribe
  624. *
  625. * @return boolean
  626. */
  627. public function getUnsubscribe()
  628. {
  629. return $this->unsubscribe;
  630. }
  631. /**
  632. * Set registrationCode
  633. *
  634. * @param string $registrationCode
  635. * @return Course
  636. */
  637. public function setRegistrationCode($registrationCode)
  638. {
  639. $this->registrationCode = $registrationCode;
  640. return $this;
  641. }
  642. /**
  643. * Get registrationCode
  644. *
  645. * @return string
  646. */
  647. public function getRegistrationCode()
  648. {
  649. return $this->registrationCode;
  650. }
  651. /**
  652. * Set legal
  653. *
  654. * @param string $legal
  655. * @return Course
  656. */
  657. public function setLegal($legal)
  658. {
  659. $this->legal = $legal;
  660. return $this;
  661. }
  662. /**
  663. * Get legal
  664. *
  665. * @return string
  666. */
  667. public function getLegal()
  668. {
  669. return $this->legal;
  670. }
  671. /**
  672. * Set activateLegal
  673. *
  674. * @param integer $activateLegal
  675. * @return Course
  676. */
  677. public function setActivateLegal($activateLegal)
  678. {
  679. $this->activateLegal = $activateLegal;
  680. return $this;
  681. }
  682. /**
  683. * Get activateLegal
  684. *
  685. * @return integer
  686. */
  687. public function getActivateLegal()
  688. {
  689. return $this->activateLegal;
  690. }
  691. /**
  692. * Set courseTypeId
  693. *
  694. * @param integer $courseTypeId
  695. * @return Course
  696. */
  697. public function setCourseTypeId($courseTypeId)
  698. {
  699. $this->courseTypeId = $courseTypeId;
  700. return $this;
  701. }
  702. /**
  703. * Get courseTypeId
  704. *
  705. * @return integer
  706. */
  707. public function getCourseTypeId()
  708. {
  709. return $this->courseTypeId;
  710. }
  711. }