@golemio/parkings
Version:
Golemio Parkings Module
68 lines • 2.67 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntrancesModel = void 0;
const SharedSchemaProvider_1 = require("@golemio/core/dist/schema-definitions/SharedSchemaProvider");
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
class EntrancesModel extends sequelize_1.Model {
}
exports.EntrancesModel = EntrancesModel;
EntrancesModel.tableName = "parking_entrances";
EntrancesModel.attributeModel = {
entrance_id: {
primaryKey: true,
type: sequelize_1.DataTypes.STRING,
},
parking_id: {
primaryKey: true,
type: sequelize_1.DataTypes.STRING,
},
source: {
type: sequelize_1.DataTypes.STRING,
},
location: sequelize_1.DataTypes.GEOMETRY,
entry: sequelize_1.DataTypes.BOOLEAN,
exit: sequelize_1.DataTypes.BOOLEAN,
entrance_type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.STRING),
level: sequelize_1.DataTypes.FLOAT,
max_height: sequelize_1.DataTypes.FLOAT,
max_width: sequelize_1.DataTypes.FLOAT,
max_length: sequelize_1.DataTypes.FLOAT,
max_weight: sequelize_1.DataTypes.FLOAT,
};
EntrancesModel.jsonSchema = {
type: "array",
items: {
type: "object",
properties: {
entrance_id: { type: "string" },
parking_id: { type: "string" },
source: { type: "string" },
entry: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
exit: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
level: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
max_height: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
max_width: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
max_length: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
max_weight: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
location: { $ref: "#/definitions/geometry" },
entrance_type: {
oneOf: [
{
type: "array",
items: {
type: "string",
},
},
{ type: "null", nullable: true },
],
},
},
required: ["entrance_id", "source", "parking_id"],
additionalProperties: false,
},
definitions: {
// @ts-expect-error
geometry: SharedSchemaProvider_1.SharedSchemaProvider.Geometry,
},
};
//# sourceMappingURL=EntranceModel.js.map