File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments