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


public final class TblRBSArrow {

    public static final String NAME = "RBS_ARROW";

    public static final String COL_ID = "ARROW_ID";
    public static final String COL_MANUFACTURER = "ARROW_MANUFACTURER";
    public static final String COL_MODEL = "ARROW_MODEL";
    public static final String COL_DIAMETER = "ARROW_DIAMETER";
    public static final String COL_WEIGHT = "ARROW_WEIGHT";
    public static final String COL_CW = "ARROW_CW";
    public static final String COL_V0 = "ARROW_V0";
    public static final String COL_COLORS = "ARROW_COLORS";

    private TblRBSArrow() {
    }

    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_DIAMETER + " Real NOT NULL, "
                + COL_WEIGHT + " Real NOT NULL, "
                + COL_CW + " Real NOT NULL, "
                + COL_V0 + " Real NOT NULL, "
                + COL_COLORS + " Text NOT NULL, "
                + "constraint UNIQUE_MF_MODEL_DIAMETER UNIQUE (" + COL_MANUFACTURER + "," + COL_MODEL + "," + COL_DIAMETER + ")"
                + ");";
    }

}
