mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: volume type icon
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { volumeConfigSchema } from "@ironmount/schemas";
|
||||
import type { BackendType, volumeConfigSchema } from "@ironmount/schemas";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { int, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
||||
|
||||
@@ -6,7 +6,7 @@ export const volumesTable = sqliteTable("volumes_table", {
|
||||
id: int().primaryKey({ autoIncrement: true }),
|
||||
name: text().notNull().unique(),
|
||||
path: text().notNull(),
|
||||
type: text().notNull(),
|
||||
type: text().$type<BackendType>().notNull(),
|
||||
createdAt: int("created_at", { mode: "timestamp" }).notNull().default(sql`(unixepoch())`),
|
||||
updatedAt: int("updated_at", { mode: "timestamp" }).notNull().default(sql`(unixepoch())`),
|
||||
config: text("config", { mode: "json" }).$type<typeof volumeConfigSchema.inferOut>().notNull(),
|
||||
|
||||
@@ -6,7 +6,7 @@ import { resolver } from "hono-openapi/arktype";
|
||||
const volumeSchema = type({
|
||||
name: "string",
|
||||
path: "string",
|
||||
type: "string",
|
||||
type: type.enumerated("nfs", "smb", "directory"),
|
||||
createdAt: "number",
|
||||
updatedAt: "number",
|
||||
config: volumeConfigSchema,
|
||||
|
||||
Reference in New Issue
Block a user