'ID', 'user_id' => '用户ID', 'before_country_id' => '移民前国家ID', 'after_country_id' => '移民后国家ID', 'period_num' => '期数', 'created_at' => '创建时间', 'created_by' => '创建人', ]; } public function beforeCountry() { return $this->hasOne(Countries::class, ['ID' => 'before_country_id']); } public function afterCountry() { return $this->hasOne(Countries::class, ['ID' => 'after_country_id']); } public function member() { return $this->hasOne(User::class, ['ID' => 'user_id']); } public function creater() { return $this->hasOne(User::class, ['ID' => 'created_by']); } }