format('Y-m-d H:i:s'); } /** * @Desc 关联卡主表 * @Author Gorden * @Date 2024/11/18 11:15 * * @return \Illuminate\Database\Eloquent\Relations\HasOne */ public function main() { return $this->hasOne(CardMain::class, 'card_main_id', 'join_issue_card_main_id'); } /** * @Desc 关联后台用户 * @Author Gorden * @Date 2024/11/18 11:15 * * @return \Illuminate\Database\Eloquent\Relations\HasOne */ public function user() { return $this->hasOne(SysUser::class, 'user_id', 'card_issue_creator_user_id')->select('user_id', 'user_name'); } }