package com.usky.issue.service.listener;

import com.usky.issue.domain.SysUser;
import org.springframework.context.ApplicationEvent;

/**
 * 用户数据变更事件
 *
 * @author fyc
 * @date 2026-05-21
 */
public class CloudUserChangedEvent extends ApplicationEvent {

    private final String operation;

    public CloudUserChangedEvent(SysUser user, String operation) {
        super(user);
        this.operation = operation != null ? operation : "UPDATE";
    }

    public SysUser getUser() {
        return (SysUser) getSource();
    }

    public String getOperation() {
        return operation;
    }
}
