"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GeodataPlacesTable = void 0;
const sql_tools_1 = require("@immich/sql-tools");
let GeodataPlacesTable = class GeodataPlacesTable {
    id;
    name;
    longitude;
    latitude;
    countryCode;
    admin1Code;
    admin2Code;
    modificationDate;
    admin1Name;
    admin2Name;
    alternateNames;
};
exports.GeodataPlacesTable = GeodataPlacesTable;
__decorate([
    (0, sql_tools_1.PrimaryColumn)({ type: 'integer' }),
    __metadata("design:type", Number)
], GeodataPlacesTable.prototype, "id", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'character varying', length: 200 }),
    __metadata("design:type", String)
], GeodataPlacesTable.prototype, "name", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'double precision' }),
    __metadata("design:type", Number)
], GeodataPlacesTable.prototype, "longitude", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'double precision' }),
    __metadata("design:type", Number)
], GeodataPlacesTable.prototype, "latitude", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'character', length: 2 }),
    __metadata("design:type", String)
], GeodataPlacesTable.prototype, "countryCode", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'character varying', length: 20, nullable: true }),
    __metadata("design:type", Object)
], GeodataPlacesTable.prototype, "admin1Code", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'character varying', length: 80, nullable: true }),
    __metadata("design:type", Object)
], GeodataPlacesTable.prototype, "admin2Code", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'date' }),
    __metadata("design:type", Object)
], GeodataPlacesTable.prototype, "modificationDate", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'character varying', nullable: true }),
    __metadata("design:type", Object)
], GeodataPlacesTable.prototype, "admin1Name", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'character varying', nullable: true }),
    __metadata("design:type", Object)
], GeodataPlacesTable.prototype, "admin2Name", void 0);
__decorate([
    (0, sql_tools_1.Column)({ type: 'character varying', nullable: true }),
    __metadata("design:type", Object)
], GeodataPlacesTable.prototype, "alternateNames", void 0);
exports.GeodataPlacesTable = GeodataPlacesTable = __decorate([
    (0, sql_tools_1.Table)({ name: 'geodata_places', primaryConstraintName: 'geodata_places_pkey' }),
    (0, sql_tools_1.Index)({
        name: 'idx_geodata_places_alternate_names',
        using: 'gin',
        expression: 'f_unaccent("alternateNames") gin_trgm_ops',
    }),
    (0, sql_tools_1.Index)({
        name: 'idx_geodata_places_admin1_name',
        using: 'gin',
        expression: 'f_unaccent("admin1Name") gin_trgm_ops',
    }),
    (0, sql_tools_1.Index)({
        name: 'idx_geodata_places_admin2_name',
        using: 'gin',
        expression: 'f_unaccent("admin2Name") gin_trgm_ops',
    }),
    (0, sql_tools_1.Index)({
        name: 'idx_geodata_places_name',
        using: 'gin',
        expression: 'f_unaccent("name") gin_trgm_ops',
    }),
    (0, sql_tools_1.Index)({
        name: 'IDX_geodata_gist_earthcoord',
        expression: 'll_to_earth_public(latitude, longitude)',
    })
], GeodataPlacesTable);
//# sourceMappingURL=geodata-places.table.js.map