/*
 * Copyright (C) 2022 - Florindo Smilari (spherIC)
 */
package ch.spherIC.recurvebowsight.database.scheme.masterdata;


public final class TblRBSSight {

    public static final String NAME = "RBS_SIGHT";

    public static final String COL_ID = "SIGHT_ID";
    public static final String COL_MANUFACTURER = "SIGHT_MANUFACTURER";
    public static final String COL_MODEL = "SIGHT_MODEL";
    public static final String COL_AV = "SIGHT_AV";
    public static final String COL_AH = "SIGHT_AH";
    public static final String COL_HEVIS = "SIGHT_HEVIS";
    public static final String COL_VERTSKALARANGE_MIN = "SIGHT_VERTSKALARANGE_MIN";
    public static final String COL_VERTSKALARANGE_MAX = "SIGHT_VERTSKALARANGE_MAX";
    public static final String COL_POINTER_OFFSET = "SIGHT_POINTER_OFFSET";

    private TblRBSSight() {
    }

    public static String getCreateStatement() {
        return "create table " + NAME + "("
                + COL_ID + " Integer primary key autoincrement, "
                + COL_MANUFACTURER + " Text NOT NULL, "
                + COL_MODEL + " Text NOT NULL, "
                + COL_AV + " Real NOT NULL, "
                + COL_AH + " Real NOT NULL, "
                + COL_HEVIS + " Text NOT NULL, "
                + COL_VERTSKALARANGE_MIN + " Real NOT NULL, "
                + COL_VERTSKALARANGE_MAX + " Real NOT NULL, "
                + COL_POINTER_OFFSET + " Real NOT NULL DEFAULT 0, "
                + "constraint UNIQUE_SIGHT_MF_MODEL UNIQUE (" + COL_MANUFACTURER + "," + COL_MODEL + ")"
                + ");";
    }

}
