Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
company.php
1<?php
2
4
6
7
24class CompanyTable extends Main\Entity\DataManager
25{
26 public static function getTableName()
27 {
28 return 'b_sale_company';
29 }
30
31 public static function getMap()
32 {
33 return array(
34 'ID' => array(
35 'data_type' => 'integer',
36 'primary' => true,
37 'autocomplete' => true
38 ),
39 'NAME' => array(
40 'data_type' => 'string',
41 'required' => true
42 ),
43 'LOCATION_ID' => array(
44 'data_type' => 'string'
45 ),
46 'LOCATION' => array(
47 'data_type' => 'Bitrix\Sale\Location\Location',
48 'reference' => array(
49 '=this.LOCATION_ID' => 'ref.CODE'
50 )
51 ),
52 'CODE' => array(
53 'data_type' => 'string'
54 ),
55 'XML_ID' => array(
56 'data_type' => 'string'
57 ),
58 'ACTIVE' => array(
59 'data_type' => 'string'
60 ),
61 'DATE_CREATE' => array(
62 'data_type' => 'datetime'
63 ),
64 'DATE_MODIFY' => array(
65 'data_type' => 'datetime'
66 ),
67 'CREATED_BY' => array(
68 'data_type' => 'integer',
69 ),
70 'CREATED' => array(
71 'data_type' => 'Bitrix\Main\User',
72 'reference' => array(
73 '=this.CREATED_BY' => 'ref.ID'
74 )
75 ),
76 'MODIFIED_BY' => array(
77 'data_type' => 'integer'
78 ),
79 'MODIFIED' => array(
80 'data_type' => 'Bitrix\Main\User',
81 'reference' => array(
82 '=this.MODIFIED_BY' => 'ref.ID'
83 )
84 ),
85 'ADDRESS' => array(
86 'data_type' => 'string'
87 ),
88 'SORT' => array(
89 'data_type' => 'integer',
90 'default_value' => 100
91 )
92 );
93 }
94
95 public static function getUfId()
96 {
97 return 'SALE_COMPANY';
98 }
99
100}