mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
## Description This attempts to connect the Steam account to user account... for easier management <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced user profiles and account views now display integrated Steam account details and enriched team associations for a more comprehensive experience. - **Chores** - Backend and database refinements have been implemented to improve system stability, data integrity, and overall performance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
40 lines
1.5 KiB
TypeScript
40 lines
1.5 KiB
TypeScript
import { } from "drizzle-orm/postgres-js";
|
|
import { timestamps, id, ulid } from "../drizzle/types";
|
|
import {
|
|
text,
|
|
varchar,
|
|
pgTable,
|
|
uniqueIndex,
|
|
point,
|
|
primaryKey,
|
|
} from "drizzle-orm/pg-core";
|
|
|
|
export const machineTable = pgTable(
|
|
"machine",
|
|
{
|
|
...id,
|
|
...timestamps,
|
|
// userID: ulid("user_id"),
|
|
country: text('country').notNull(),
|
|
timezone: text('timezone').notNull(),
|
|
location: point('location', { mode: 'xy' }).notNull(),
|
|
fingerprint: varchar('fingerprint', { length: 32 }).notNull(),
|
|
countryCode: varchar('country_code', { length: 2 }).notNull(),
|
|
// provider: text("provider").notNull(),
|
|
// gpuType: text("gpu_type").notNull(),
|
|
// storage: numeric("storage").notNull(),
|
|
// ipaddress: text("ipaddress").notNull(),
|
|
// gpuNumber: integer("gpu_number").notNull(),
|
|
// computePrice: numeric("compute_price").notNull(),
|
|
// driverVersion: integer("driver_version").notNull(),
|
|
// operatingSystem: text("operating_system").notNull(),
|
|
// fingerprint: varchar("fingerprint", { length: 32 }).notNull(),
|
|
// externalID: varchar("external_id", { length: 255 }).notNull(),
|
|
// cudaVersion: numeric("cuda_version", { precision: 4, scale: 2 }).notNull(),
|
|
},
|
|
(table) => [
|
|
// uniqueIndex("external_id").on(table.externalID),
|
|
uniqueIndex("machine_fingerprint").on(table.fingerprint),
|
|
// primaryKey({ columns: [table.userID, table.id], }),
|
|
],
|
|
); |