package lc.sips.schema;

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

/**
 * This class holds a column definition for a table in a SIPS schema.
 *
 * @author Alex Leigh
 * @since 1.0
 */
public record ColumnDefinition(String name, ColumnType type, int length, String parentTable, boolean onDeleteCascade)
        implements Serializable, Comparable<ColumnDefinition> {
    @Serial
    private static final long serialVersionUID = 1L;

    @Override
    public int compareTo(ColumnDefinition o) {
        return name.compareTo(o.name());
    }
    // TODO: Implement argument validations
}
