-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfavoriteProductsClass.php
26 lines (24 loc) · 1.1 KB
/
favoriteProductsClass.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
class favoriteProductsClass extends ObjectModel
{
public $id_favorite_products;
public $id_product;
public $id_customer;
public $firstname;
public $lastname;
public $id_shop;
public $date_add;
public static $definition = [
'table' => 'favorite_products',
'primary' => 'id_customer',
'fields' => [
'id_favorite_product' => ['type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true,],
'id_product' => ['type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true,],
'id_customer' => ['type' => self::TYPE_INT, 'validate' => 'isGenericName', 'required' => true,],
'firstname' => ['type' => self::TYPE_STRING, 'validate' => 'isAnything', 'required' => true],
'lastname' => ['type' => self::TYPE_STRING, 'validate' => 'isAnything', 'required' => true],
'id_shop' => ['type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true,],
'date_add' => ['type' => self::TYPE_DATE, 'validate' => 'isDateFormat'],
],
];
}