CourseRelUser.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. <?php
  2. namespace Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * CourseRelUser
  6. *
  7. * @ORM\Table(name="course_rel_user")
  8. * @ORM\Entity
  9. */
  10. class CourseRelUser
  11. {
  12. /**
  13. * @var integer
  14. *
  15. * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="IDENTITY")
  18. */
  19. private $id;
  20. /**
  21. * @var string
  22. *
  23. * @ORM\Column(name="course_code", type="string", length=40, precision=0, scale=0, nullable=false, unique=false)
  24. */
  25. private $courseCode;
  26. /**
  27. * @var integer
  28. *
  29. * @ORM\Column(name="user_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  30. */
  31. private $userId;
  32. /**
  33. * @var integer
  34. *
  35. * @ORM\Column(name="relation_type", type="integer", precision=0, scale=0, nullable=false, unique=false)
  36. */
  37. private $relationType;
  38. /**
  39. * @var boolean
  40. *
  41. * @ORM\Column(name="status", type="boolean", precision=0, scale=0, nullable=false, unique=false)
  42. */
  43. private $status;
  44. /**
  45. * @var string
  46. *
  47. * @ORM\Column(name="role", type="string", length=60, precision=0, scale=0, nullable=true, unique=false)
  48. */
  49. private $role;
  50. /**
  51. * @var integer
  52. *
  53. * @ORM\Column(name="group_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  54. */
  55. private $groupId;
  56. /**
  57. * @var integer
  58. *
  59. * @ORM\Column(name="tutor_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  60. */
  61. private $tutorId;
  62. /**
  63. * @var integer
  64. *
  65. * @ORM\Column(name="sort", type="integer", precision=0, scale=0, nullable=true, unique=false)
  66. */
  67. private $sort;
  68. /**
  69. * @var integer
  70. *
  71. * @ORM\Column(name="user_course_cat", type="integer", precision=0, scale=0, nullable=true, unique=false)
  72. */
  73. private $userCourseCat;
  74. /**
  75. * @var integer
  76. *
  77. * @ORM\Column(name="legal_agreement", type="integer", precision=0, scale=0, nullable=true, unique=false)
  78. */
  79. private $legalAgreement;
  80. /**
  81. * @var integer
  82. *
  83. * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  84. */
  85. private $cId;
  86. /**
  87. * @ORM\ManyToOne(targetEntity="User")
  88. * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id")
  89. */
  90. private $user;
  91. /**
  92. * @ORM\ManyToOne(targetEntity="Course")
  93. * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
  94. */
  95. private $course;
  96. public function __construct(Course $course, User $user)
  97. {
  98. $this->course = $course;
  99. $this->user = $user;
  100. }
  101. /**
  102. * Set cId
  103. *
  104. * @param integer $cId
  105. * @return CourseRelUser
  106. */
  107. public function setCId($cId)
  108. {
  109. $this->cId = $cId;
  110. return $this;
  111. }
  112. /**
  113. * Get cId
  114. *
  115. * @return integer
  116. */
  117. public function getCId()
  118. {
  119. return $this->cId;
  120. }
  121. /**
  122. * Set courseCode
  123. *
  124. * @param string $courseCode
  125. * @return CourseRelUser
  126. */
  127. public function setCourseCode($courseCode)
  128. {
  129. $this->courseCode = $courseCode;
  130. return $this;
  131. }
  132. /**
  133. * Get courseCode
  134. *
  135. * @return string
  136. */
  137. public function getCourseCode()
  138. {
  139. return $this->courseCode;
  140. }
  141. /**
  142. * Set userId
  143. *
  144. * @param integer $userId
  145. * @return CourseRelUser
  146. */
  147. public function setUserId($userId)
  148. {
  149. $this->userId = $userId;
  150. return $this;
  151. }
  152. /**
  153. * Get userId
  154. *
  155. * @return integer
  156. */
  157. public function getUserId()
  158. {
  159. return $this->userId;
  160. }
  161. /**
  162. * Set relationType
  163. *
  164. * @param integer $relationType
  165. * @return CourseRelUser
  166. */
  167. public function setRelationType($relationType)
  168. {
  169. $this->relationType = $relationType;
  170. return $this;
  171. }
  172. /**
  173. * Get relationType
  174. *
  175. * @return integer
  176. */
  177. public function getRelationType()
  178. {
  179. return $this->relationType;
  180. }
  181. /**
  182. * Set status
  183. *
  184. * @param boolean $status
  185. * @return CourseRelUser
  186. */
  187. public function setStatus($status)
  188. {
  189. $this->status = $status;
  190. return $this;
  191. }
  192. /**
  193. * Get status
  194. *
  195. * @return boolean
  196. */
  197. public function getStatus()
  198. {
  199. return $this->status;
  200. }
  201. /**
  202. * Set role
  203. *
  204. * @param string $role
  205. * @return CourseRelUser
  206. */
  207. public function setRole($role)
  208. {
  209. $this->role = $role;
  210. return $this;
  211. }
  212. /**
  213. * Get role
  214. *
  215. * @return string
  216. */
  217. public function getRole()
  218. {
  219. return $this->role;
  220. }
  221. /**
  222. * Set groupId
  223. *
  224. * @param integer $groupId
  225. * @return CourseRelUser
  226. */
  227. public function setGroupId($groupId)
  228. {
  229. $this->groupId = $groupId;
  230. return $this;
  231. }
  232. /**
  233. * Get groupId
  234. *
  235. * @return integer
  236. */
  237. public function getGroupId()
  238. {
  239. return $this->groupId;
  240. }
  241. /**
  242. * Set tutorId
  243. *
  244. * @param integer $tutorId
  245. * @return CourseRelUser
  246. */
  247. public function setTutorId($tutorId)
  248. {
  249. $this->tutorId = $tutorId;
  250. return $this;
  251. }
  252. /**
  253. * Get tutorId
  254. *
  255. * @return integer
  256. */
  257. public function getTutorId()
  258. {
  259. return $this->tutorId;
  260. }
  261. /**
  262. * Set sort
  263. *
  264. * @param integer $sort
  265. * @return CourseRelUser
  266. */
  267. public function setSort($sort)
  268. {
  269. $this->sort = $sort;
  270. return $this;
  271. }
  272. /**
  273. * Get sort
  274. *
  275. * @return integer
  276. */
  277. public function getSort()
  278. {
  279. return $this->sort;
  280. }
  281. /**
  282. * Set userCourseCat
  283. *
  284. * @param integer $userCourseCat
  285. * @return CourseRelUser
  286. */
  287. public function setUserCourseCat($userCourseCat)
  288. {
  289. $this->userCourseCat = $userCourseCat;
  290. return $this;
  291. }
  292. /**
  293. * Get userCourseCat
  294. *
  295. * @return integer
  296. */
  297. public function getUserCourseCat()
  298. {
  299. return $this->userCourseCat;
  300. }
  301. /**
  302. * Set legalAgreement
  303. *
  304. * @param integer $legalAgreement
  305. * @return CourseRelUser
  306. */
  307. public function setLegalAgreement($legalAgreement)
  308. {
  309. $this->legalAgreement = $legalAgreement;
  310. return $this;
  311. }
  312. /**
  313. * Get legalAgreement
  314. *
  315. * @return integer
  316. */
  317. public function getLegalAgreement()
  318. {
  319. return $this->legalAgreement;
  320. }
  321. }