'揽收', 0 => '在途', 5 => '派件', self::STATE_SIGN => '签收', 6 => '退回', 4 => '退签', 7 => '转投', 2 => '疑难', 8 => '清关', 14 => '拒签', ]; /** * @comment 物流详情[单] * @return HasOne */ public function detail(): HasOne { return $this->hasOne(ExpressDetail::class, 'express_no_id')->orderByDesc('detail_at'); } /** * @comment 物流详情[多] * @return HasMany */ public function details(): HasMany { return $this->hasMany(ExpressDetail::class, 'express_no_id')->orderByDesc('detail_at'); } /** * @comment 快递公司 * @return BelongsTo */ public function company(): BelongsTo { return $this->belongsTo(ExpressCompany::class, 'express_company_code', 'code'); } /** * @comment 物流状态 * @return string */ public function getStateStringAttribute(): string { return self::STATE[$this->state] ?? ''; } }