Skip to content

Commit 1ae8103

Browse files
authored
Create TestResultTable.php
1 parent 7472356 commit 1ae8103

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

TestResultTable.php

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
namespace Learning;
3+
use Bitrix\Main\Entity;
4+
5+
class TestResultTable extends Entity\DataManager
6+
{
7+
/**
8+
* Returns DB table name for entity.
9+
*
10+
* @return string
11+
*/
12+
public static function getTableName()
13+
{
14+
return 'b_learn_test_result';
15+
}
16+
17+
/**
18+
* Returns entity map definition.
19+
*
20+
* @return array
21+
*/
22+
public static function getMap()
23+
{
24+
return array(
25+
'ID' => array(
26+
'data_type' => 'integer',
27+
'primary' => true,
28+
'autocomplete' => true,
29+
),
30+
'ATTEMPT_ID' => array(
31+
'data_type' => 'integer',
32+
'required' => true,
33+
),
34+
'QUESTION_ID' => array(
35+
'data_type' => 'integer',
36+
'required' => true,
37+
),
38+
'RESPONSE' => array(
39+
'data_type' => 'text',
40+
),
41+
'POINT' => array(
42+
'data_type' => 'integer',
43+
'required' => true,
44+
),
45+
'CORRECT' => array(
46+
'data_type' => 'boolean',
47+
'values' => array('N', 'Y'),
48+
),
49+
'ANSWERED' => array(
50+
'data_type' => 'boolean',
51+
'values' => array('N', 'Y'),
52+
),
53+
);
54+
}
55+
}
56+

0 commit comments

Comments
 (0)