-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathproduct.php
More file actions
30 lines (27 loc) · 696 Bytes
/
product.php
File metadata and controls
30 lines (27 loc) · 696 Bytes
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
27
28
29
30
<?php
/**
* To make IDEs autocomplete happy
*
* @property int id
* @property int userid
* @property int customerId
* @property string productName
*/
class product extends dbObject {
protected $dbTable = "products";
protected $primaryKey = "id";
protected $dbFields = Array (
'userId' => Array('int', 'required'),
'customerId' => Array ('int', 'required'),
'productName' => Array ('text','required')
);
protected $relations = Array (
'userId' => Array ("hasOne", "user"),
'user' => Array ("hasOne", "user", "userId")
);
public function last () {
$this->where ("id" , 130, '>');
return $this;
}
}
?>