Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
addresstable.php
1<?php
2
4
8
28{
34 public static function getTableName()
35 {
36 return 'b_location_address';
37 }
38
45 public static function getMap()
46 {
47 return array(
48 (new Fields\IntegerField('ID'))
49 ->configurePrimary(true)
50 ->configureAutocomplete(true),
51
52 new Fields\IntegerField('LOCATION_ID'),
53
54 (new Fields\StringField('LANGUAGE_ID'))
55 ->configureRequired(true)
56 ->addValidator(new Main\ORM\Fields\Validators\LengthValidator(2, 2)),
57
58 new Fields\FloatField('LATITUDE', ['scale' => 6]),
59 new Fields\FloatField('LONGITUDE', ['scale' => 6]),
60
61 (new Fields\Relations\OneToMany('FIELDS', AddressFieldTable::class, 'ADDRESS'))
62 ->configureJoinType('left'),
63
64 (new Fields\Relations\OneToMany('LINKS', AddressLinkTable::class, 'ADDRESS'))
65 ->configureJoinType('left'),
66
67 (new Fields\Relations\Reference('LOCATION', LocationTable::class,
68 Join::on('this.LOCATION_ID', 'ref.ID')))
69 ->configureJoinType('left')
70 );
71 }
72}