Properties

$deleteTime

$deleteTime : 

Type

$autoWriteTimestamp

$autoWriteTimestamp : 

Type

$readonly

$readonly : 

Type

$tenant_id

$tenant_id : 

Type

$uid

$uid : 

Type

$globalScope

$globalScope : 

Type

$type

$type : 

Type

$auto

$auto : 

Type

$insert

$insert : 

Type

$int

$int : 

Type

Methods

__construct()

__construct(  $data = array()) 

Parameters

$data

setConfig()

setConfig(  $data = array()) : integer|string

设置模型参数

Parameters

$data

Returns

integer|string

setTenantId()

setTenantId(  $value) : integer|string

设置租户id

Parameters

$value

Returns

integer|string

getTenantId()

getTenantId() : integer

返回租户id

Returns

integer

setUid()

setUid(  $value) : integer|string

设置用户id

Parameters

$value

Returns

integer|string

scopeTenantId()

scopeTenantId(  $query) 

Parameters

$query

model()

model() 

模型一对一关联

picture()

picture() 

图片模型一对一关联

getNavTree()

getNavTree(string  $where = '', integer  $pid, boolean  $field = true, string  $order = 'sort asc,id asc') : array|false|\PDOStatement|string|\think\Collection

返回导航数组树

Parameters

string $where
integer $pid
boolean $field
string $order

Returns

array|false|\PDOStatement|string|\think\Collection

getTree()

getTree(string  $where = '', string  $title = 'title', string  $pk = 'id', string  $pid = 'pid', integer  $root) 

返回select树形列表

Parameters

string $where
string $title
string $pk
string $pid
integer $root

getSubNav()

getSubNav(integer  $id, string  $tongji = true, string  $where = '', boolean  $field = true, string  $order = 'sort asc,id asc') : array|false|\PDOStatement|string|\think\Collection

返回子分类,如果没有子分类返回同级分类($tongji=true)

Parameters

integer $id
string $tongji

是否显示同级分类,默认为true

string $where
boolean $field
string $order

Returns

array|false|\PDOStatement|string|\think\Collection

getBreadcrumb()

getBreadcrumb(integer  $id, array  $data = array()) : array

返回面包屑导航,配合标签使用

Parameters

integer $id
array $data

Returns

array

getChildrenId()

getChildrenId(string  $cate) : string

获取指定分类子分类ID

Parameters

string $cate

分类ID

Returns

string —

id列表

getQianshouIds()

getQianshouIds(  $isName = false) : array|string

返回签收IDS数组

Parameters

$isName

Returns

array|string

getCreateTimeAttr()

getCreateTimeAttr(  $value) 

Parameters

$value

getUpdateTimeAttr()

getUpdateTimeAttr(  $value) 

Parameters

$value

init()

init() 

mapBuild()

mapBuild(  $field,   $condition, null  $op = null) : array

条件表达式生成 Author: websky

Parameters

$field

字段名

$condition

查询条件

null $op

查询表达式

Returns

array