\App\ModelsAdLink

Summary

Methods
Properties
Constants
getInfo()
saveInfo()
getInfoByWhere()
deleteInfo()
getPagesInfo()
getCount()
getList()
$id
$title
$c_type
$image
$url
$order
$is_show
$target
$additional
$description
$created_at
$updated_at
No constants found
No protected methods found
$table
$fillable
$casts
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : integer

Type

integer

$title

$title : string

Type

string

$c_type

$c_type : integer

Type

integer

$image

$image : string

Type

string

$url

$url : string

Type

string

$order

$order : integer

Type

integer

$is_show

$is_show : integer

Type

integer

$target

$target : string

Type

string

$additional

$additional : string

Type

string

$description

$description : string

Type

string

$created_at

$created_at : \Carbon\Carbon

Type

\Carbon\Carbon

$updated_at

$updated_at : \Carbon\Carbon

Type

\Carbon\Carbon

$table

$table : string

The table associated with the model.

Type

string

$fillable

$fillable : array

The attributes that are mass assignable.

Type

array

$casts

$casts : array

The attributes that should be cast to native types.

Type

array

Methods

getInfo()

getInfo(  $id, boolean  $useCache = true) : \App\Models\BaseModel|\Hyperf\Database\Model\Model|null

getInfo 通过主键id/ids获取信息 User:YM Date:2020/1/8 Time:下午5:55

Parameters

$id
boolean $useCache

是否使用模型缓存

Returns

\App\Models\BaseModel|\Hyperf\Database\Model\Model|null

saveInfo()

saveInfo(  $data, boolean  $type = false) : null

saveInfo 创建/修改记录 User:YM Date:2020/1/8 Time:下午7:49

Parameters

$data

保存数据

boolean $type

是否强制写入,适用于主键是规则生成情况

Returns

null

getInfoByWhere()

getInfoByWhere(  $where, boolean  $type = false) : array

getInfoByWhere 根据条件获取结果 User:YM Date:2020/1/9 Time:下午10:24

Parameters

$where
boolean $type

是否查询多条

Returns

array

deleteInfo()

deleteInfo(  $ids,   $type = 'delete') : integer

deleteInfo 删除/恢复 User:YM Date:2020/2/3 Time:下午8:22

Parameters

$ids

删除的主键ids

$type

Returns

integer

getPagesInfo()

getPagesInfo(  $where = array()) : array

getPagesInfo 获取分页信息,适用于数据量小 数据量过大,可以采用服务层调用,加入缓存 User:YM Date:2020/2/4 Time:下午10:16

Parameters

$where

Returns

array

getCount()

getCount(array  $where = array()) : integer

getCount 根据条件获取总数 User:YM Date:2020/2/4 Time:下午10:16

Parameters

array $where

Returns

integer

getList()

getList(array  $where = array(), array  $order = array(), integer  $offset, integer  $limit) : array

getList 获取系统友情链接列表 User:YM Date:2020/2/10 Time:下午10:36

Parameters

array $where

查询条件

array $order

排序条件

integer $offset

偏移

integer $limit

条数

Returns

array