"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeparturesDirectionModel = void 0;
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
const ropid_departures_directions_1 = require("../../ropid-departures-directions");
class DeparturesDirectionModel extends sequelize_1.Model {
}
exports.DeparturesDirectionModel = DeparturesDirectionModel;
DeparturesDirectionModel.TABLE_NAME = "ropid_departures_directions";
DeparturesDirectionModel.attributeModel = {
    id: {
        type: sequelize_1.DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true,
        unique: true,
    },
    departure_stop_id: {
        type: sequelize_1.DataTypes.TEXT,
        allowNull: false,
    },
    next_stop_id_regexp: {
        type: sequelize_1.DataTypes.TEXT,
        allowNull: false,
    },
    direction: {
        type: sequelize_1.DataTypes.TEXT,
        allowNull: false,
    },
    rule_order: {
        type: sequelize_1.DataTypes.INTEGER,
        allowNull: false,
        defaultValue: 0,
    },
    create_batch_id: {
        type: sequelize_1.DataTypes.BIGINT,
        allowNull: true,
    },
    created_by: {
        type: sequelize_1.DataTypes.STRING(150),
        allowNull: true,
    },
    update_batch_id: {
        type: sequelize_1.DataTypes.BIGINT,
        allowNull: true,
    },
    updated_by: {
        type: sequelize_1.DataTypes.STRING(150),
        allowNull: true,
    },
};
// @ts-expect-error
DeparturesDirectionModel.arrayJsonSchema = {
    type: "array",
    items: {
        type: "object",
        properties: {
            departure_stop_id: {
                type: "string",
            },
            next_stop_id_regexp: {
                type: "string",
            },
            direction: {
                type: "string",
                enum: ropid_departures_directions_1.PossibleDeparturesDirections,
            },
            rule_order: {
                type: "number",
            },
            create_batch_id: {
                type: ["string", "null"],
            },
            created_by: {
                type: ["string", "null"],
            },
            update_batch_id: {
                type: ["string", "null"],
            },
            updated_by: {
                type: ["string", "null"],
            },
        },
        required: ["departure_stop_id", "next_stop_id_regexp", "direction", "rule_order"],
    },
};
//# sourceMappingURL=DeparturesDirectionDto.js.map