\App\ModelsSysDictType

字典类型

职责:字典数据项的分类容器,is_tree 区分平铺/树形两种形态。

Summary

Methods
Properties
Constants
timestampCasts()
data()
$timestamps
$id
$code
$name
$is_tree
$sort
$status
$remark
$create_time
$update_time
No constants found
serializeDate()
casts()
$table
$fillable
N/A
No private methods found
No private properties found
N/A

Properties

$timestamps

$timestamps

$id

$id : int

主键ID

Type

int

$code

$code : string

字典类型编码,唯一

Type

string

$name

$name : string

字典类型名称

Type

string

$is_tree

$is_tree : int

字典形态:0 平铺、1 树形

Type

int

$sort

$sort : int

排序,越小越靠前,列表拖拽维护

Type

int

$status

$status : int

状态:1 启用,0 停用

Type

int

$remark

$remark : string

备注说明

Type

string

$create_time

$create_time : string

创建时间

Type

string

$update_time

$update_time : string|null

更新时间

┌────────────────── 分区导航(按此顺序阅读)──────────────────┐ 分区 1 · 常量 本地枚举(启停状态 STATUS_* 已单源 HasStatusConstants) 分区 2 · 表名与属性 $table / $fillable / casts 分区 3 · 关联关系 data └────────────────────────────────────────────────────────────┘

Type

string|null

$table

$table

$fillable

$fillable

Methods

timestampCasts()

timestampCasts() : array<string,string>

全库统一的时间列 cast 段(单源:约 22 个模型 casts() 内重复的两行)。 使用方模型 casts() 内 `return array_merge(self::timestampCasts(), [...])`。

Returns

array

data()

data() : \Illuminate\Database\Eloquent\Relations\HasMany

类型下的字典数据项

Returns

\Illuminate\Database\Eloquent\Relations\HasMany —

serializeDate()

serializeDate(\DateTimeInterface  $date) : string

所有日期属性统一按 "年-月-日 时:分:秒" 序列化。

Parameters

\DateTimeInterface $date

Returns

string —

casts()

casts() : array

Returns

array —