Skip to content

Commit ed48d52

Browse files
committed
Internal: Add entities required for XApi LRS
1 parent c6a59e2 commit ed48d52

16 files changed

+1748
-0
lines changed

src/CoreBundle/Entity/XApiActor.php

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
<?php
2+
3+
/* For licensing terms, see /license.txt */
4+
5+
declare(strict_types=1);
6+
7+
namespace Chamilo\CoreBundle\Entity;
8+
9+
use Chamilo\CoreBundle\Repository\XApiActorRepository;
10+
use Doctrine\ORM\Mapping as ORM;
11+
12+
#[ORM\Entity(repositoryClass: XApiActorRepository::class)]
13+
class XApiActor
14+
{
15+
#[ORM\Id]
16+
#[ORM\GeneratedValue]
17+
#[ORM\Column]
18+
private ?int $identifier = null;
19+
20+
#[ORM\Column(length: 255, nullable: true)]
21+
private ?string $type = null;
22+
23+
#[ORM\Column(length: 255, nullable: true)]
24+
private ?string $mbox = null;
25+
26+
#[ORM\Column(length: 255, nullable: true)]
27+
private ?string $mboxSha1Sum = null;
28+
29+
#[ORM\Column(length: 255, nullable: true)]
30+
private ?string $openId = null;
31+
32+
#[ORM\Column(length: 255, nullable: true)]
33+
private ?string $accountName = null;
34+
35+
#[ORM\Column(length: 255, nullable: true)]
36+
private ?string $accountHomePage = null;
37+
38+
#[ORM\Column(length: 255, nullable: true)]
39+
private ?string $name = null;
40+
41+
public function getIdentifier(): ?int
42+
{
43+
return $this->identifier;
44+
}
45+
46+
public function getType(): ?string
47+
{
48+
return $this->type;
49+
}
50+
51+
public function setType(?string $type): static
52+
{
53+
$this->type = $type;
54+
55+
return $this;
56+
}
57+
58+
public function getMbox(): ?string
59+
{
60+
return $this->mbox;
61+
}
62+
63+
public function setMbox(?string $mbox): static
64+
{
65+
$this->mbox = $mbox;
66+
67+
return $this;
68+
}
69+
70+
public function getMboxSha1Sum(): ?string
71+
{
72+
return $this->mboxSha1Sum;
73+
}
74+
75+
public function setMboxSha1Sum(?string $mboxSha1Sum): static
76+
{
77+
$this->mboxSha1Sum = $mboxSha1Sum;
78+
79+
return $this;
80+
}
81+
82+
public function getOpenId(): ?string
83+
{
84+
return $this->openId;
85+
}
86+
87+
public function setOpenId(?string $openId): static
88+
{
89+
$this->openId = $openId;
90+
91+
return $this;
92+
}
93+
94+
public function getAccountName(): ?string
95+
{
96+
return $this->accountName;
97+
}
98+
99+
public function setAccountName(?string $accountName): static
100+
{
101+
$this->accountName = $accountName;
102+
103+
return $this;
104+
}
105+
106+
public function getAccountHomePage(): ?string
107+
{
108+
return $this->accountHomePage;
109+
}
110+
111+
public function setAccountHomePage(?string $accountHomePage): static
112+
{
113+
$this->accountHomePage = $accountHomePage;
114+
115+
return $this;
116+
}
117+
118+
public function getName(): ?string
119+
{
120+
return $this->name;
121+
}
122+
123+
public function setName(?string $name): static
124+
{
125+
$this->name = $name;
126+
127+
return $this;
128+
}
129+
}
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
<?php
2+
3+
/* For licensing terms, see /license.txt */
4+
5+
declare(strict_types=1);
6+
7+
namespace Chamilo\CoreBundle\Entity;
8+
9+
use Chamilo\CoreBundle\Repository\XApiAttachmentRepository;
10+
use Doctrine\DBAL\Types\Types;
11+
use Doctrine\ORM\Mapping as ORM;
12+
13+
#[ORM\Entity(repositoryClass: XApiAttachmentRepository::class)]
14+
class XApiAttachment
15+
{
16+
#[ORM\Id]
17+
#[ORM\GeneratedValue]
18+
#[ORM\Column]
19+
private ?int $identifier = null;
20+
21+
#[ORM\Column(length: 255)]
22+
private ?string $usageType = null;
23+
24+
#[ORM\Column]
25+
private ?int $contentType = null;
26+
27+
#[ORM\Column]
28+
private ?int $length = null;
29+
30+
#[ORM\Column(length: 255)]
31+
private ?string $sha2 = null;
32+
33+
#[ORM\Column]
34+
private array $display = [];
35+
36+
#[ORM\Column]
37+
private ?bool $hasDescription = null;
38+
39+
#[ORM\Column(nullable: true)]
40+
private ?array $description = null;
41+
42+
#[ORM\Column(length: 255, nullable: true)]
43+
private ?string $fileUrl = null;
44+
45+
#[ORM\Column(type: Types::TEXT, nullable: true)]
46+
private ?string $content = null;
47+
48+
#[ORM\ManyToOne(inversedBy: 'attachments')]
49+
private ?XApiStatement $statement = null;
50+
51+
public function getIdentifier(): ?int
52+
{
53+
return $this->identifier;
54+
}
55+
56+
public function getUsageType(): ?string
57+
{
58+
return $this->usageType;
59+
}
60+
61+
public function setUsageType(string $usageType): static
62+
{
63+
$this->usageType = $usageType;
64+
65+
return $this;
66+
}
67+
68+
public function getLength(): ?int
69+
{
70+
return $this->length;
71+
}
72+
73+
public function setLength(int $length): static
74+
{
75+
$this->length = $length;
76+
77+
return $this;
78+
}
79+
80+
public function getContentType(): ?int
81+
{
82+
return $this->contentType;
83+
}
84+
85+
public function setContentType(int $contentType): static
86+
{
87+
$this->contentType = $contentType;
88+
89+
return $this;
90+
}
91+
92+
public function getSha2(): ?string
93+
{
94+
return $this->sha2;
95+
}
96+
97+
public function setSha2(string $sha2): static
98+
{
99+
$this->sha2 = $sha2;
100+
101+
return $this;
102+
}
103+
104+
public function getDisplay(): array
105+
{
106+
return $this->display;
107+
}
108+
109+
public function setDisplay(array $display): static
110+
{
111+
$this->display = $display;
112+
113+
return $this;
114+
}
115+
116+
public function hasDescription(): ?bool
117+
{
118+
return $this->hasDescription;
119+
}
120+
121+
public function setHasDescription(bool $hasDescription): static
122+
{
123+
$this->hasDescription = $hasDescription;
124+
125+
return $this;
126+
}
127+
128+
public function getDescription(): ?array
129+
{
130+
return $this->description;
131+
}
132+
133+
public function setDescription(?array $description): static
134+
{
135+
$this->description = $description;
136+
137+
return $this;
138+
}
139+
140+
public function getFileUrl(): ?string
141+
{
142+
return $this->fileUrl;
143+
}
144+
145+
public function setFileUrl(?string $fileUrl): static
146+
{
147+
$this->fileUrl = $fileUrl;
148+
149+
return $this;
150+
}
151+
152+
public function getContent(): ?string
153+
{
154+
return $this->content;
155+
}
156+
157+
public function setContent(?string $content): static
158+
{
159+
$this->content = $content;
160+
161+
return $this;
162+
}
163+
164+
public function getStatement(): ?XApiStatement
165+
{
166+
return $this->statement;
167+
}
168+
169+
public function setStatement(?XApiStatement $statement): static
170+
{
171+
$this->statement = $statement;
172+
173+
return $this;
174+
}
175+
}

0 commit comments

Comments
 (0)