Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
localdeliveryrequest.php
1<?php
2
4
5use Bitrix\Main\Entity\DataManager;
6use Bitrix\Main\Entity\ReferenceField;
7
26{
30 public static function getTableName()
31 {
32 return 'b_sale_local_delivery_requests';
33 }
34
38 public static function getMap()
39 {
40 return [
41 'ID' => [
42 'data_type' => 'integer',
43 'primary' => true,
44 'autocomplete' => true
45 ],
46 'DELIVERY_SERVICE_ID' => [
47 'data_type' => 'integer',
48 'required' => true,
49 ],
50 'SHIPMENT_ID' => [
51 'data_type' => 'integer',
52 'required' => true,
53 ],
54 'CREATED_AT' => [
55 'data_type' => 'datetime',
56 'required' => true,
57 ],
58 'EXTERNAL_ID' => [
59 'data_type' => 'string',
60 'required' => true,
61 ],
62 new ReferenceField(
63 'SHIPMENT',
64 '\Bitrix\Sale\Internals\ShipmentTable',
65 ['=this.SHIPMENT_ID' => 'ref.ID']
66 ),
67 ];
68 }
69}
70
71/*
72 * `ID` int NOT NULL AUTO_INCREMENT,
73 `CREATED_AT` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
74 `SHIPMENT_ID` int NOT NULL,
75 `DELIVERY_SERVICE_ID` int NOT NULL,
76 `EXTERNAL_ID` varchar(255) NOT NULL,
77 * */