"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.rolesEnumMulti2 = exports.rolesEnumMulti = exports.UsersTable2 = exports.CitiesTable2 = void 0;
const drizzle_orm_1 = require("drizzle-orm");
const type_1 = require("drizzle-orm/types/type");
class CitiesTable2 extends drizzle_orm_1.AbstractTable {
    constructor() {
        super(...arguments);
        this.name = this.timestamp('name', { notNull: true }).defaultValue(new Date());
        this.page = this.varchar('page', { size: 256 });
        this.roleEnum = this.type(exports.rolesEnumMulti, 'role');
        this.userId1 = this.int('user_id').foreignKey(UsersTable2, (table) => table.id);
        this.data = this.jsonb('data');
    }
    tableName() {
        return 'cities';
    }
}
exports.CitiesTable2 = CitiesTable2;
class UsersTable2 extends drizzle_orm_1.AbstractTable {
    constructor() {
        super(...arguments);
        this.id = this.int('id').autoIncrement().primaryKey();
        this.phone = this.varchar('phone', { size: 256 }).unique();
        this.fullName = this.varchar('full_name', { size: 512 });
        this.test = this.decimal('test', { notNull: true, precision: 100, scale: 2 });
        this.test1 = this.bigint('test1', { notNull: true });
        this.createdAt = this.timestamp('created_at', { notNull: true });
        this.updatedAt = this.timestamp('updated_at', { notNull: true });
        this.phoneFullNameIndex = this.index([this.phone, this.fullName]);
        this.phoneIndex = this.index(this.phone);
    }
    tableName() {
        return 'cities';
    }
}
exports.UsersTable2 = UsersTable2;
exports.rolesEnumMulti = type_1.createEnum({
    alias: "roles_enum",
    values: ["role1", "role2", "role3"],
});
exports.rolesEnumMulti2 = type_1.createEnum({
    alias: "roles2_enum",
    values: ["role1.1", "role2.2", "role3.3"],
});
//# sourceMappingURL=multi.js.map