package com.easyagents.skill.model;

import java.io.Serial;
import java.io.Serializable;

/**
 * SKILL.md 中的一基源码位置。
 */
public final class SkillSourceLocation implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private final int line;
    private final int column;

    /**
     * 创建源码位置。
     *
     * @param line 一基行号
     * @param column 一基列号
     */
    public SkillSourceLocation(int line, int column) {
        if (line < 1 || column < 1) {
            throw new IllegalArgumentException("Skill source location must be one-based.");
        }
        this.line = line;
        this.column = column;
    }

    /** @return 一基行号 */
    public int getLine() {
        return line;
    }

    /** @return 一基列号 */
    public int getColumn() {
        return column;
    }
}
