\App\ModelsSysCompany

组织(原「公司」)

职责:数据隔离第一级容器 + 法律实体(公司类型)。region_id/address 为档案属性, 不参与权限推导。法人(legal_person_id)关联 sys_user,法人个人信息一律从用户模型读取。 org_kind 组织类型(枚举值待定,先用示例值)。

Summary

Methods
Properties
Constants
timestampCasts()
legalPerson()
region()
depts()
postScopes()
userScopes()
$timestamps
$id
$name
$code
$org_kind
$credit_code
$legal_person_id
$phone
$email
$fax
$company_type
$established_at
$region_id
$address
$sort
$status
$remark
$create_time
$update_time
$legalPerson
ORG_KIND_COMPANY
ORG_KIND_GROUP
ORG_KIND_PROJECT
ORG_KIND_PARTY
ORG_KIND_COMMITTEE
ORG_KIND_TEMP_TEAM
serializeDate()
casts()
$table
$fillable
N/A
No private methods found
No private properties found
N/A

Constants

ORG_KIND_COMPANY

ORG_KIND_COMPANY = 1

组织类型:公司

ORG_KIND_GROUP

ORG_KIND_GROUP = 2

组织类型:课题组

ORG_KIND_PROJECT

ORG_KIND_PROJECT = 3

组织类型:项目部

ORG_KIND_PARTY

ORG_KIND_PARTY = 4

组织类型:党委

ORG_KIND_COMMITTEE

ORG_KIND_COMMITTEE = 5

组织类型:工委

ORG_KIND_TEMP_TEAM

ORG_KIND_TEMP_TEAM = 6

组织类型:临时专班

Properties

$timestamps

$timestamps

$id

$id : int

主键ID

Type

int

$name

$name : string

组织名称

Type

string

$code

$code : string

组织编码

Type

string

$org_kind

$org_kind : int

组织类型:1 公司、2 课题组、3 项目部、4 党委、5 工委、6 临时专班

Type

int

$credit_code

$credit_code : string|null

统一社会信用代码,18 位

Type

string|null

$legal_person_id

$legal_person_id : int

法人用户ID,0=未设置

Type

int

$phone

$phone : string

公司电话,与法人个人电话区分

Type

string

$email

$email : string

公司邮箱,与法人个人邮箱区分

Type

string

$fax

$fax : string

传真

Type

string

$company_type

$company_type : int

公司类型:1 集团、2 子公司、3 分公司,仅 org_kind=公司 有意义

Type

int

$established_at

$established_at : string|null

成立日期

Type

string|null

$region_id

$region_id : int

所在地区ID,档案属性

Type

int

$address

$address : string

详细地址,门牌号级

Type

string

$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

更新时间

Type

string|null

$legalPerson

$legalPerson : \App\Models\SysUser|null

法人用户

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

Type

SysUser|null

$table

$table

$fillable

$fillable

Methods

timestampCasts()

timestampCasts() : array<string,string>

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

Returns

array

legalPerson()

legalPerson() : \Illuminate\Database\Eloquent\Relations\BelongsTo

法人用户

Returns

\Illuminate\Database\Eloquent\Relations\BelongsTo —

region()

region() : \Illuminate\Database\Eloquent\Relations\BelongsTo

所属地区(档案字段;region_id=0 未设置)

Returns

\Illuminate\Database\Eloquent\Relations\BelongsTo —

depts()

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

公司下的部门

Returns

\Illuminate\Database\Eloquent\Relations\HasMany —

postScopes()

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

组织下被引用的岗位范围配置(岗位数据范围)

Returns

\Illuminate\Database\Eloquent\Relations\HasMany —

userScopes()

userScopes() : \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 —