Initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace Shop\Model;
|
||||
use Think\Model\RelationModel;
|
||||
class ShopCartModel extends RelationModel{
|
||||
//关联模型
|
||||
Protected $_link=array(
|
||||
"cms_product"=>array(
|
||||
'mapping_type' => self::BELONGS_TO,
|
||||
'foreign_key' => 'product_id',
|
||||
),
|
||||
"cat"=>array(
|
||||
'mapping_type' => self::BELONGS_TO,
|
||||
'foreign_key' => 'catid',
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user