'datetime', 'fecha_fin_vigencia' => 'datetime', ]; /** * Get the estado associated with the CodigoPostal. */ public function estado(): HasOne { return $this->hasOne(Estado::class, 'c_estado', 'c_estado'); } /** * Get the municipio associated with the CodigoPostal. */ public function municipio(): HasOne { return $this->hasOne(Municipio::class, 'c_municipio', 'c_municipio') ->where('c_estado', $this->c_estado); } /** * Get the localidad associated with the CodigoPostal. */ public function localidad(): HasOne { return $this->hasOne(Localidad::class, 'c_estado', 'c_estado') ->where('c_localidad', $this->c_localidad); } /** * Get the localidad associated with the CodigoPostal. */ public function colonias(): HasMany { return $this->hasMany(Colonia::class, 'c_codigo_postal', 'c_codigo_postal'); } }