package com.njcn.gather.detection.lock;

/**
 * 检测互斥锁对象（不可变）。
 * 字段含义见 docs/superpowers/specs/2026-05-28-单用户检测互斥-design.md §2.1
 */
public final class DetectionLock {

    private final String userId;
    private final String userName;
    private final String userPageId;
    private final long acquireTime;
    private final long expireAt;

    public DetectionLock(String userId, String userName, String userPageId,
                         long acquireTime, long expireAt) {
        this.userId = userId;
        this.userName = userName;
        this.userPageId = userPageId;
        this.acquireTime = acquireTime;
        this.expireAt = expireAt;
    }

    public String getUserId()      { return userId; }
    public String getUserName()    { return userName; }
    public String getUserPageId()  { return userPageId; }
    public long   getAcquireTime() { return acquireTime; }
    public long   getExpireAt()    { return expireAt; }
}
