first commit
This commit is contained in:
1
金壶/ydyd_service/application/common/model/.pydio
Normal file
1
金壶/ydyd_service/application/common/model/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c01a439b-332b-47b8-a9b6-07a322c5a88d
|
||||
25
金壶/ydyd_service/application/common/model/AreaModel.php
Normal file
25
金壶/ydyd_service/application/common/model/AreaModel.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: typ
|
||||
* Date: 2019/1/3
|
||||
* Time: 14:45
|
||||
*/
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class AreaModel extends Model
|
||||
{
|
||||
|
||||
public function parent()
|
||||
{
|
||||
return $this->belongsTo(AreaModel::class, 'parent_area_id')->field('id, area_name, parent_area_id');
|
||||
}
|
||||
|
||||
public function childs()
|
||||
{
|
||||
return $this->hasMany(AreaModel::class, 'parent_area_id')->field('id, area_name, parent_area_id');
|
||||
}
|
||||
}
|
||||
11
金壶/ydyd_service/application/common/model/SkuModel.php
Normal file
11
金壶/ydyd_service/application/common/model/SkuModel.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace app\common\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class SkuModel extends Model{
|
||||
protected $pk = 'id';
|
||||
//protected $name = 'Sku';
|
||||
protected $table = 'ydyd_goods_batch_area_relation';
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user