Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
usertransacttable.php
1
<?php
2
3
namespace
Bitrix\Sale\Internals
;
4
5
use
Bitrix\Main\ORM\Data\DataManager
;
6
use
Bitrix\Main\ORM\Fields\BooleanField
;
7
use
Bitrix\Main\ORM\Fields\DatetimeField
;
8
use
Bitrix\Main\ORM\Fields\FloatField
;
9
use
Bitrix\Main\ORM\Fields\IntegerField
;
10
use
Bitrix\Main\ORM\Fields\Relations\Reference
;
11
use
Bitrix\Main\ORM\Fields\StringField
;
12
use
Bitrix\Main\ORM\Fields\TextField
;
13
use
Bitrix\Main\ORM\Fields\Validators\LengthValidator
;
14
use
Bitrix\Main\ORM\Query\Join
;
15
use
Bitrix\Main\Type\DateTime
;
16
51
class
UserTransactTable
extends
DataManager
52
{
58
public
static
function
getTableName
()
59
{
60
return
'b_sale_user_transact'
;
61
}
62
68
public
static
function
getMap
()
69
{
70
return
[
71
'ID'
=>
72
(
new
IntegerField
(
'ID'
))
73
->configurePrimary(
true
)
74
->configureAutocomplete(
true
)
75
,
76
'USER_ID'
=>
77
(
new
IntegerField
(
'USER_ID'
))
78
->configureRequired(
true
)
79
,
80
'TIMESTAMP_X'
=>
81
(
new
DatetimeField
(
'TIMESTAMP_X'
))
82
->configureDefaultValue(
83
static
function
()
84
{
85
return
new
DateTime
();
86
}
87
)
88
,
89
'TRANSACT_DATE'
=>
90
(
new
DatetimeField
(
'TRANSACT_DATE'
))
91
->configureRequired(
true
)
92
,
93
'AMOUNT'
=>
94
(
new
FloatField
(
'AMOUNT'
))
95
->configureDefaultValue(0.0000)
96
,
97
'CURRENCY'
=>
98
(
new
StringField
(
'CURRENCY'
))
99
->configureRequired(
true
)
100
->addValidator(
new
LengthValidator
(
null
, 3))
101
,
102
'DEBIT'
=> (
new
BooleanField
(
'DEBIT'
))
103
->configureValues(
'N'
,
'Y'
)
104
->configureDefaultValue(
'N'
)
105
,
106
'ORDER_ID'
=> (
new
IntegerField
(
'ORDER_ID'
)),
107
'DESCRIPTION'
=>
108
(
new
StringField
(
'DESCRIPTION'
))
109
->configureRequired(
true
)
110
->addValidator(
new
LengthValidator
(
null
, 255))
111
,
112
'NOTES'
=> (
new
TextField
(
'NOTES'
)),
113
'PAYMENT_ID'
=> (
new
IntegerField
(
'PAYMENT_ID'
)),
114
'EMPLOYEE_ID'
=> (
new
IntegerField
(
'EMPLOYEE_ID'
)),
115
//
116
new
Reference
(
117
'ORDER'
,
118
OrderTable::class,
119
Join::on(
'this.ORDER_ID'
,
'ref.ID'
)
120
),
121
new
Reference
(
122
'PAYMENT'
,
123
PaymentTable::class,
124
Join::on(
'this.PAYMENT_ID'
,
'ref.ID'
)
125
),
126
];
127
}
128
}
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\BooleanField
Definition
booleanfield.php:20
Bitrix\Main\ORM\Fields\DatetimeField
Definition
datetimefield.php:22
Bitrix\Main\ORM\Fields\FloatField
Definition
floatfield.php:20
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\Relations\Reference
Definition
reference.php:26
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\TextField
Definition
textfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Main\ORM\Query\Join
Definition
join.php:19
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Sale\Internals\UserTransactTable
Definition
usertransacttable.php:52
Bitrix\Sale\Internals\UserTransactTable\getMap
static getMap()
Definition
usertransacttable.php:68
Bitrix\Sale\Internals\UserTransactTable\getTableName
static getTableName()
Definition
usertransacttable.php:58
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
usertransacttable.php
Создано системой
1.10.0