chore(types): regenerate payload types and schema
Regenerate payload-types.ts and payload-generated-schema.ts to cover the forthcoming user-notifications, game-npcs, and market collections (including the quantity column on market-negotiations).
This commit is contained in:
parent
6b94686de4
commit
4a76b54426
2 changed files with 1039 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ export const enum_game_event_logs_target_collection = pgEnum(
|
|||
[
|
||||
"game-structures",
|
||||
"game-vehicles",
|
||||
"game-npcs",
|
||||
"structures",
|
||||
"resources",
|
||||
"assets",
|
||||
|
|
@ -50,6 +51,10 @@ export const enum_game_event_logs_target_collection = pgEnum(
|
|||
"bank-accounts",
|
||||
"bank-transactions",
|
||||
"ledger-entries",
|
||||
"locker-storages",
|
||||
"loadouts",
|
||||
"market-listings",
|
||||
"market-negotiations",
|
||||
],
|
||||
);
|
||||
export const enum_users_roles = pgEnum("enum_users_roles", ["guest", "user", "admin", "developer"]);
|
||||
|
|
@ -114,6 +119,10 @@ export const enum_technologies_approval_status = pgEnum("enum_technologies_appro
|
|||
"revision_requested",
|
||||
]);
|
||||
export const enum_technologies_type = pgEnum("enum_technologies_type", ["asset", "upgrade"]);
|
||||
export const enum_assets_skin_configuration_applies_to_asset_types = pgEnum(
|
||||
"enum_assets_skin_configuration_applies_to_asset_types",
|
||||
["weapon", "uniform", "vest", "backpack", "helmet"],
|
||||
);
|
||||
export const enum_assets_approval_status = pgEnum("enum_assets_approval_status", [
|
||||
"in_progress",
|
||||
"ready_for_review",
|
||||
|
|
@ -137,6 +146,7 @@ export const enum_assets_asset_type = pgEnum("enum_assets_asset_type", [
|
|||
"medical",
|
||||
"tool",
|
||||
"explosive",
|
||||
"skin",
|
||||
"miscellaneous",
|
||||
]);
|
||||
export const enum_assets_weapon_configuration_slot_type = pgEnum(
|
||||
|
|
@ -270,6 +280,28 @@ export const enum_ledger_entries_type = pgEnum("enum_ledger_entries_type", [
|
|||
"salary",
|
||||
"adjustment",
|
||||
]);
|
||||
export const enum_market_listings_status = pgEnum("enum_market_listings_status", [
|
||||
"active",
|
||||
"sold",
|
||||
"cancelled",
|
||||
"expired",
|
||||
]);
|
||||
export const enum_market_negotiations_history_from = pgEnum(
|
||||
"enum_market_negotiations_history_from",
|
||||
["buyer", "seller"],
|
||||
);
|
||||
export const enum_market_negotiations_status = pgEnum("enum_market_negotiations_status", [
|
||||
"open",
|
||||
"accepted",
|
||||
"rejected",
|
||||
"closed",
|
||||
"cancelled",
|
||||
"expired",
|
||||
]);
|
||||
export const enum_market_negotiations_proposed_by = pgEnum("enum_market_negotiations_proposed_by", [
|
||||
"buyer",
|
||||
"seller",
|
||||
]);
|
||||
export const enum_narrative_events_triggers_type = pgEnum("enum_narrative_events_triggers_type", [
|
||||
"manual",
|
||||
"mission_complete",
|
||||
|
|
@ -502,6 +534,65 @@ export const game_vehicles = pgTable(
|
|||
],
|
||||
);
|
||||
|
||||
export const game_npcs = pgTable(
|
||||
"game_npcs",
|
||||
{
|
||||
id: serial("id").primaryKey(),
|
||||
name: varchar("name").notNull(),
|
||||
occupation: varchar("occupation"),
|
||||
location: integer("location_id").references(() => game_structures.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
faction: integer("faction_id").references(() => factions.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
bio: varchar("bio"),
|
||||
isGenerated: boolean("is_generated").default(false),
|
||||
isInGame: boolean("is_in_game").default(true),
|
||||
vendor_enabled: boolean("vendor_enabled").default(false),
|
||||
vendor_priceModifier: numeric("vendor_price_modifier", { mode: "number" }).default(1),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
},
|
||||
(columns) => [
|
||||
index("game_npcs_location_idx").on(columns.location),
|
||||
index("game_npcs_faction_idx").on(columns.faction),
|
||||
index("game_npcs_updated_at_idx").on(columns.updatedAt),
|
||||
index("game_npcs_created_at_idx").on(columns.createdAt),
|
||||
],
|
||||
);
|
||||
|
||||
export const game_npcs_rels = pgTable(
|
||||
"game_npcs_rels",
|
||||
{
|
||||
id: serial("id").primaryKey(),
|
||||
order: integer("order"),
|
||||
parent: integer("parent_id").notNull(),
|
||||
path: varchar("path").notNull(),
|
||||
assetsID: integer("assets_id"),
|
||||
},
|
||||
(columns) => [
|
||||
index("game_npcs_rels_order_idx").on(columns.order),
|
||||
index("game_npcs_rels_parent_idx").on(columns.parent),
|
||||
index("game_npcs_rels_path_idx").on(columns.path),
|
||||
index("game_npcs_rels_assets_id_idx").on(columns.assetsID),
|
||||
foreignKey({
|
||||
columns: [columns["parent"]],
|
||||
foreignColumns: [game_npcs.id],
|
||||
name: "game_npcs_rels_parent_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["assetsID"]],
|
||||
foreignColumns: [assets.id],
|
||||
name: "game_npcs_rels_assets_fk",
|
||||
}).onDelete("cascade"),
|
||||
],
|
||||
);
|
||||
|
||||
export const game_event_logs = pgTable(
|
||||
"game_event_logs",
|
||||
{
|
||||
|
|
@ -676,6 +767,22 @@ export const profiles = pgTable(
|
|||
progression_scoreboard_deaths: numeric("progression_scoreboard_deaths", {
|
||||
mode: "number",
|
||||
}).default(0),
|
||||
progression_minigames_flappyBird_gamesPlayed: numeric(
|
||||
"progression_minigames_flappy_bird_games_played",
|
||||
{ mode: "number" },
|
||||
).default(0),
|
||||
progression_minigames_flappyBird_totalPasses: numeric(
|
||||
"progression_minigames_flappy_bird_total_passes",
|
||||
{ mode: "number" },
|
||||
).default(0),
|
||||
progression_minigames_flappyBird_bestScore: numeric(
|
||||
"progression_minigames_flappy_bird_best_score",
|
||||
{ mode: "number" },
|
||||
).default(0),
|
||||
progression_minigames_flappyBird_xpEarned: numeric(
|
||||
"progression_minigames_flappy_bird_xp_earned",
|
||||
{ mode: "number" },
|
||||
).default(0),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
|
|
@ -852,6 +959,35 @@ export const experience = pgTable(
|
|||
],
|
||||
);
|
||||
|
||||
export const user_notifications = pgTable(
|
||||
"user_notifications",
|
||||
{
|
||||
id: serial("id").primaryKey(),
|
||||
user: integer("user_id")
|
||||
.notNull()
|
||||
.references(() => users.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
type: varchar("type"),
|
||||
title: varchar("title").notNull(),
|
||||
message: varchar("message"),
|
||||
link: varchar("link"),
|
||||
read: boolean("read").default(false),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
},
|
||||
(columns) => [
|
||||
index("user_notifications_user_idx").on(columns.user),
|
||||
index("user_notifications_read_idx").on(columns.read),
|
||||
index("user_notifications_updated_at_idx").on(columns.updatedAt),
|
||||
index("user_notifications_created_at_idx").on(columns.createdAt),
|
||||
],
|
||||
);
|
||||
|
||||
export const missions_mission_roles_provided_roles = pgTable(
|
||||
"missions_mission_roles_provided_roles",
|
||||
{
|
||||
|
|
@ -1334,6 +1470,25 @@ export const technologies_rels = pgTable(
|
|||
],
|
||||
);
|
||||
|
||||
export const assets_skin_configuration_applies_to_asset_types = pgTable(
|
||||
"assets_skin_configuration_applies_to_asset_types",
|
||||
{
|
||||
order: integer("order").notNull(),
|
||||
parent: integer("parent_id").notNull(),
|
||||
value: enum_assets_skin_configuration_applies_to_asset_types("value"),
|
||||
id: serial("id").primaryKey(),
|
||||
},
|
||||
(columns) => [
|
||||
index("assets_skin_configuration_applies_to_asset_types_order_idx").on(columns.order),
|
||||
index("assets_skin_configuration_applies_to_asset_types_parent_idx").on(columns.parent),
|
||||
foreignKey({
|
||||
columns: [columns["parent"]],
|
||||
foreignColumns: [assets.id],
|
||||
name: "assets_skin_configuration_applies_to_asset_types_parent_fk",
|
||||
}).onDelete("cascade"),
|
||||
],
|
||||
);
|
||||
|
||||
export const assets_crafting_crafting_data_inputs = pgTable(
|
||||
"assets_crafting_crafting_data_inputs",
|
||||
{
|
||||
|
|
@ -1432,6 +1587,17 @@ export const assets = pgTable(
|
|||
})
|
||||
.notNull()
|
||||
.default(1),
|
||||
storageDimensions_gridWidth: numeric("storage_dimensions_grid_width", { mode: "number" })
|
||||
.notNull()
|
||||
.default(1),
|
||||
storageDimensions_gridHeight: numeric("storage_dimensions_grid_height", { mode: "number" })
|
||||
.notNull()
|
||||
.default(1),
|
||||
storageDimensions_stackable: boolean("storage_dimensions_stackable").default(true),
|
||||
storageDimensions_maxStackSize: numeric("storage_dimensions_max_stack_size", {
|
||||
mode: "number",
|
||||
}),
|
||||
storageDimensions_rotatable: boolean("storage_dimensions_rotatable").default(true),
|
||||
isLive: boolean("is_live"),
|
||||
notes: jsonb("notes"),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
|
|
@ -2255,6 +2421,276 @@ export const ledger_entries = pgTable(
|
|||
],
|
||||
);
|
||||
|
||||
export const locker_storages_items_equipment_attachments = pgTable(
|
||||
"locker_storages_items_equipment_attachments",
|
||||
{
|
||||
_order: integer("_order").notNull(),
|
||||
_parentID: varchar("_parent_id").notNull(),
|
||||
id: varchar("id").primaryKey(),
|
||||
asset: integer("asset_id")
|
||||
.notNull()
|
||||
.references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
},
|
||||
(columns) => [
|
||||
index("locker_storages_items_equipment_attachments_order_idx").on(columns._order),
|
||||
index("locker_storages_items_equipment_attachments_parent_id_idx").on(columns._parentID),
|
||||
index("locker_storages_items_equipment_attachments_asset_idx").on(columns.asset),
|
||||
foreignKey({
|
||||
columns: [columns["_parentID"]],
|
||||
foreignColumns: [locker_storages_items.id],
|
||||
name: "locker_storages_items_equipment_attachments_parent_id_fk",
|
||||
}).onDelete("cascade"),
|
||||
],
|
||||
);
|
||||
|
||||
export const locker_storages_items = pgTable(
|
||||
"locker_storages_items",
|
||||
{
|
||||
_order: integer("_order").notNull(),
|
||||
_parentID: integer("_parent_id").notNull(),
|
||||
id: varchar("id").primaryKey(),
|
||||
asset: integer("asset_id")
|
||||
.notNull()
|
||||
.references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
quantity: numeric("quantity", { mode: "number" }).notNull().default(1),
|
||||
gridX: numeric("grid_x", { mode: "number" }).notNull().default(0),
|
||||
gridY: numeric("grid_y", { mode: "number" }).notNull().default(0),
|
||||
rotated: boolean("rotated").default(false),
|
||||
equipment_skin: integer("equipment_skin_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
equipment_customName: varchar("equipment_custom_name"),
|
||||
},
|
||||
(columns) => [
|
||||
index("locker_storages_items_order_idx").on(columns._order),
|
||||
index("locker_storages_items_parent_id_idx").on(columns._parentID),
|
||||
index("locker_storages_items_asset_idx").on(columns.asset),
|
||||
index("locker_storages_items_equipment_equipment_skin_idx").on(columns.equipment_skin),
|
||||
foreignKey({
|
||||
columns: [columns["_parentID"]],
|
||||
foreignColumns: [locker_storages.id],
|
||||
name: "locker_storages_items_parent_id_fk",
|
||||
}).onDelete("cascade"),
|
||||
],
|
||||
);
|
||||
|
||||
export const locker_storages = pgTable(
|
||||
"locker_storages",
|
||||
{
|
||||
id: serial("id").primaryKey(),
|
||||
name: varchar("name").notNull().default("Personal Locker"),
|
||||
ownerUser: integer("owner_user_id")
|
||||
.notNull()
|
||||
.references(() => users.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
itemCount: numeric("item_count", { mode: "number" }),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
},
|
||||
(columns) => [
|
||||
index("locker_storages_owner_user_idx").on(columns.ownerUser),
|
||||
index("locker_storages_updated_at_idx").on(columns.updatedAt),
|
||||
index("locker_storages_created_at_idx").on(columns.createdAt),
|
||||
],
|
||||
);
|
||||
|
||||
export const loadouts = pgTable(
|
||||
"loadouts",
|
||||
{
|
||||
id: serial("id").primaryKey(),
|
||||
name: varchar("name").notNull(),
|
||||
description: varchar("description"),
|
||||
ownerUser: integer("owner_user_id")
|
||||
.notNull()
|
||||
.references(() => users.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
equipped: boolean("equipped").default(false),
|
||||
slots_primary: integer("slots_primary_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_secondary: integer("slots_secondary_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_launcher: integer("slots_launcher_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_uniform: integer("slots_uniform_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_vest: integer("slots_vest_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_backpack: integer("slots_backpack_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_helmet: integer("slots_helmet_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_facewear: integer("slots_facewear_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_nvg: integer("slots_nvg_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_radio: integer("slots_radio_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_optic: integer("slots_optic_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_muzzle: integer("slots_muzzle_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
slots_bipod: integer("slots_bipod_id").references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
},
|
||||
(columns) => [
|
||||
index("loadouts_owner_user_idx").on(columns.ownerUser),
|
||||
index("loadouts_slots_slots_primary_idx").on(columns.slots_primary),
|
||||
index("loadouts_slots_slots_secondary_idx").on(columns.slots_secondary),
|
||||
index("loadouts_slots_slots_launcher_idx").on(columns.slots_launcher),
|
||||
index("loadouts_slots_slots_uniform_idx").on(columns.slots_uniform),
|
||||
index("loadouts_slots_slots_vest_idx").on(columns.slots_vest),
|
||||
index("loadouts_slots_slots_backpack_idx").on(columns.slots_backpack),
|
||||
index("loadouts_slots_slots_helmet_idx").on(columns.slots_helmet),
|
||||
index("loadouts_slots_slots_facewear_idx").on(columns.slots_facewear),
|
||||
index("loadouts_slots_slots_nvg_idx").on(columns.slots_nvg),
|
||||
index("loadouts_slots_slots_radio_idx").on(columns.slots_radio),
|
||||
index("loadouts_slots_slots_optic_idx").on(columns.slots_optic),
|
||||
index("loadouts_slots_slots_muzzle_idx").on(columns.slots_muzzle),
|
||||
index("loadouts_slots_slots_bipod_idx").on(columns.slots_bipod),
|
||||
index("loadouts_updated_at_idx").on(columns.updatedAt),
|
||||
index("loadouts_created_at_idx").on(columns.createdAt),
|
||||
],
|
||||
);
|
||||
|
||||
export const market_listings = pgTable(
|
||||
"market_listings",
|
||||
{
|
||||
id: serial("id").primaryKey(),
|
||||
asset: integer("asset_id")
|
||||
.notNull()
|
||||
.references(() => assets.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
seller: integer("seller_id").references(() => users.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
npc: integer("npc_id").references(() => game_npcs.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
quantity: numeric("quantity", { mode: "number" }).notNull().default(1),
|
||||
price: numeric("price", { mode: "number" }).notNull(),
|
||||
desiredPrice: numeric("desired_price", { mode: "number" }),
|
||||
minPrice: numeric("min_price", { mode: "number" }),
|
||||
currency: integer("currency_id").references(() => resources.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
status: enum_market_listings_status("status").notNull().default("active"),
|
||||
isAutoGenerated: boolean("is_auto_generated").default(false),
|
||||
listedAt: timestamp("listed_at", {
|
||||
mode: "string",
|
||||
withTimezone: true,
|
||||
precision: 3,
|
||||
}).notNull(),
|
||||
expiresAt: timestamp("expires_at", { mode: "string", withTimezone: true, precision: 3 }),
|
||||
soldAt: timestamp("sold_at", { mode: "string", withTimezone: true, precision: 3 }),
|
||||
buyer: integer("buyer_id").references(() => users.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
},
|
||||
(columns) => [
|
||||
index("market_listings_asset_idx").on(columns.asset),
|
||||
index("market_listings_seller_idx").on(columns.seller),
|
||||
index("market_listings_npc_idx").on(columns.npc),
|
||||
index("market_listings_currency_idx").on(columns.currency),
|
||||
index("market_listings_status_idx").on(columns.status),
|
||||
index("market_listings_buyer_idx").on(columns.buyer),
|
||||
index("market_listings_updated_at_idx").on(columns.updatedAt),
|
||||
index("market_listings_created_at_idx").on(columns.createdAt),
|
||||
],
|
||||
);
|
||||
|
||||
export const market_negotiations_history = pgTable(
|
||||
"market_negotiations_history",
|
||||
{
|
||||
_order: integer("_order").notNull(),
|
||||
_parentID: integer("_parent_id").notNull(),
|
||||
id: varchar("id").primaryKey(),
|
||||
amount: numeric("amount", { mode: "number" }).notNull(),
|
||||
from: enum_market_negotiations_history_from("from").notNull(),
|
||||
note: varchar("note"),
|
||||
at: timestamp("at", { mode: "string", withTimezone: true, precision: 3 }).notNull(),
|
||||
},
|
||||
(columns) => [
|
||||
index("market_negotiations_history_order_idx").on(columns._order),
|
||||
index("market_negotiations_history_parent_id_idx").on(columns._parentID),
|
||||
foreignKey({
|
||||
columns: [columns["_parentID"]],
|
||||
foreignColumns: [market_negotiations.id],
|
||||
name: "market_negotiations_history_parent_id_fk",
|
||||
}).onDelete("cascade"),
|
||||
],
|
||||
);
|
||||
|
||||
export const market_negotiations = pgTable(
|
||||
"market_negotiations",
|
||||
{
|
||||
id: serial("id").primaryKey(),
|
||||
listing: integer("listing_id")
|
||||
.notNull()
|
||||
.references(() => market_listings.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
buyer: integer("buyer_id")
|
||||
.notNull()
|
||||
.references(() => users.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
status: enum_market_negotiations_status("status").notNull().default("open"),
|
||||
patience: numeric("patience", { mode: "number" }).default(0),
|
||||
amount: numeric("amount", { mode: "number" }).notNull(),
|
||||
proposedBy: enum_market_negotiations_proposed_by("proposed_by").notNull().default("buyer"),
|
||||
acceptedPrice: numeric("accepted_price", { mode: "number" }),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
},
|
||||
(columns) => [
|
||||
index("market_negotiations_listing_idx").on(columns.listing),
|
||||
index("market_negotiations_buyer_idx").on(columns.buyer),
|
||||
index("market_negotiations_status_idx").on(columns.status),
|
||||
index("market_negotiations_updated_at_idx").on(columns.updatedAt),
|
||||
index("market_negotiations_created_at_idx").on(columns.createdAt),
|
||||
],
|
||||
);
|
||||
|
||||
export const maps = pgTable(
|
||||
"maps",
|
||||
{
|
||||
|
|
@ -2406,6 +2842,7 @@ export const payload_locked_documents_rels = pgTable(
|
|||
"game-hard-resourcesID": integer("game_hard_resources_id"),
|
||||
"game-structuresID": integer("game_structures_id"),
|
||||
"game-vehiclesID": integer("game_vehicles_id"),
|
||||
"game-npcsID": integer("game_npcs_id"),
|
||||
"game-event-logsID": integer("game_event_logs_id"),
|
||||
usersID: integer("users_id"),
|
||||
ranksID: integer("ranks_id"),
|
||||
|
|
@ -2414,6 +2851,7 @@ export const payload_locked_documents_rels = pgTable(
|
|||
qualificationsID: integer("qualifications_id"),
|
||||
assignmentsID: integer("assignments_id"),
|
||||
experienceID: integer("experience_id"),
|
||||
"user-notificationsID": integer("user_notifications_id"),
|
||||
missionsID: integer("missions_id"),
|
||||
campaignsID: integer("campaigns_id"),
|
||||
factionsID: integer("factions_id"),
|
||||
|
|
@ -2426,6 +2864,10 @@ export const payload_locked_documents_rels = pgTable(
|
|||
"bank-accountsID": integer("bank_accounts_id"),
|
||||
"bank-transactionsID": integer("bank_transactions_id"),
|
||||
"ledger-entriesID": integer("ledger_entries_id"),
|
||||
"locker-storagesID": integer("locker_storages_id"),
|
||||
loadoutsID: integer("loadouts_id"),
|
||||
"market-listingsID": integer("market_listings_id"),
|
||||
"market-negotiationsID": integer("market_negotiations_id"),
|
||||
mapsID: integer("maps_id"),
|
||||
"narrative-eventsID": integer("narrative_events_id"),
|
||||
"mission-filesID": integer("mission_files_id"),
|
||||
|
|
@ -2441,6 +2883,7 @@ export const payload_locked_documents_rels = pgTable(
|
|||
),
|
||||
index("payload_locked_documents_rels_game_structures_id_idx").on(columns["game-structuresID"]),
|
||||
index("payload_locked_documents_rels_game_vehicles_id_idx").on(columns["game-vehiclesID"]),
|
||||
index("payload_locked_documents_rels_game_npcs_id_idx").on(columns["game-npcsID"]),
|
||||
index("payload_locked_documents_rels_game_event_logs_id_idx").on(columns["game-event-logsID"]),
|
||||
index("payload_locked_documents_rels_users_id_idx").on(columns.usersID),
|
||||
index("payload_locked_documents_rels_ranks_id_idx").on(columns.ranksID),
|
||||
|
|
@ -2449,6 +2892,9 @@ export const payload_locked_documents_rels = pgTable(
|
|||
index("payload_locked_documents_rels_qualifications_id_idx").on(columns.qualificationsID),
|
||||
index("payload_locked_documents_rels_assignments_id_idx").on(columns.assignmentsID),
|
||||
index("payload_locked_documents_rels_experience_id_idx").on(columns.experienceID),
|
||||
index("payload_locked_documents_rels_user_notifications_id_idx").on(
|
||||
columns["user-notificationsID"],
|
||||
),
|
||||
index("payload_locked_documents_rels_missions_id_idx").on(columns.missionsID),
|
||||
index("payload_locked_documents_rels_campaigns_id_idx").on(columns.campaignsID),
|
||||
index("payload_locked_documents_rels_factions_id_idx").on(columns.factionsID),
|
||||
|
|
@ -2463,6 +2909,12 @@ export const payload_locked_documents_rels = pgTable(
|
|||
columns["bank-transactionsID"],
|
||||
),
|
||||
index("payload_locked_documents_rels_ledger_entries_id_idx").on(columns["ledger-entriesID"]),
|
||||
index("payload_locked_documents_rels_locker_storages_id_idx").on(columns["locker-storagesID"]),
|
||||
index("payload_locked_documents_rels_loadouts_id_idx").on(columns.loadoutsID),
|
||||
index("payload_locked_documents_rels_market_listings_id_idx").on(columns["market-listingsID"]),
|
||||
index("payload_locked_documents_rels_market_negotiations_id_idx").on(
|
||||
columns["market-negotiationsID"],
|
||||
),
|
||||
index("payload_locked_documents_rels_maps_id_idx").on(columns.mapsID),
|
||||
index("payload_locked_documents_rels_narrative_events_id_idx").on(
|
||||
columns["narrative-eventsID"],
|
||||
|
|
@ -2494,6 +2946,11 @@ export const payload_locked_documents_rels = pgTable(
|
|||
foreignColumns: [game_vehicles.id],
|
||||
name: "payload_locked_documents_rels_game_vehicles_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["game-npcsID"]],
|
||||
foreignColumns: [game_npcs.id],
|
||||
name: "payload_locked_documents_rels_game_npcs_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["game-event-logsID"]],
|
||||
foreignColumns: [game_event_logs.id],
|
||||
|
|
@ -2534,6 +2991,11 @@ export const payload_locked_documents_rels = pgTable(
|
|||
foreignColumns: [experience.id],
|
||||
name: "payload_locked_documents_rels_experience_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["user-notificationsID"]],
|
||||
foreignColumns: [user_notifications.id],
|
||||
name: "payload_locked_documents_rels_user_notifications_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["missionsID"]],
|
||||
foreignColumns: [missions.id],
|
||||
|
|
@ -2594,6 +3056,26 @@ export const payload_locked_documents_rels = pgTable(
|
|||
foreignColumns: [ledger_entries.id],
|
||||
name: "payload_locked_documents_rels_ledger_entries_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["locker-storagesID"]],
|
||||
foreignColumns: [locker_storages.id],
|
||||
name: "payload_locked_documents_rels_locker_storages_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["loadoutsID"]],
|
||||
foreignColumns: [loadouts.id],
|
||||
name: "payload_locked_documents_rels_loadouts_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["market-listingsID"]],
|
||||
foreignColumns: [market_listings.id],
|
||||
name: "payload_locked_documents_rels_market_listings_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["market-negotiationsID"]],
|
||||
foreignColumns: [market_negotiations.id],
|
||||
name: "payload_locked_documents_rels_market_negotiations_fk",
|
||||
}).onDelete("cascade"),
|
||||
foreignKey({
|
||||
columns: [columns["mapsID"]],
|
||||
foreignColumns: [maps.id],
|
||||
|
|
@ -2694,6 +3176,8 @@ export const game_rules = pgTable(
|
|||
}),
|
||||
proximityThreshold: numeric("proximity_threshold", { mode: "number" }).default(10),
|
||||
gameTickIntervalMinutes: numeric("game_tick_interval_minutes", { mode: "number" }).default(10),
|
||||
lockerGridWidth: numeric("locker_grid_width", { mode: "number" }).default(10),
|
||||
lockerGridHeight: numeric("locker_grid_height", { mode: "number" }).default(6),
|
||||
updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }),
|
||||
createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }),
|
||||
},
|
||||
|
|
@ -2830,6 +3314,33 @@ export const relations_game_vehicles = relations(game_vehicles, ({ one, many })
|
|||
relationName: "voidStorage",
|
||||
}),
|
||||
}));
|
||||
export const relations_game_npcs_rels = relations(game_npcs_rels, ({ one }) => ({
|
||||
parent: one(game_npcs, {
|
||||
fields: [game_npcs_rels.parent],
|
||||
references: [game_npcs.id],
|
||||
relationName: "_rels",
|
||||
}),
|
||||
assetsID: one(assets, {
|
||||
fields: [game_npcs_rels.assetsID],
|
||||
references: [assets.id],
|
||||
relationName: "assets",
|
||||
}),
|
||||
}));
|
||||
export const relations_game_npcs = relations(game_npcs, ({ one, many }) => ({
|
||||
location: one(game_structures, {
|
||||
fields: [game_npcs.location],
|
||||
references: [game_structures.id],
|
||||
relationName: "location",
|
||||
}),
|
||||
faction: one(factions, {
|
||||
fields: [game_npcs.faction],
|
||||
references: [factions.id],
|
||||
relationName: "faction",
|
||||
}),
|
||||
_rels: many(game_npcs_rels, {
|
||||
relationName: "_rels",
|
||||
}),
|
||||
}));
|
||||
export const relations_game_event_logs = relations(game_event_logs, ({ one }) => ({
|
||||
actor: one(users, {
|
||||
fields: [game_event_logs.actor],
|
||||
|
|
@ -2939,6 +3450,13 @@ export const relations_assignments = relations(assignments, ({ one, many }) => (
|
|||
}),
|
||||
}));
|
||||
export const relations_experience = relations(experience, () => ({}));
|
||||
export const relations_user_notifications = relations(user_notifications, ({ one }) => ({
|
||||
user: one(users, {
|
||||
fields: [user_notifications.user],
|
||||
references: [users.id],
|
||||
relationName: "user",
|
||||
}),
|
||||
}));
|
||||
export const relations_missions_mission_roles_provided_roles = relations(
|
||||
missions_mission_roles_provided_roles,
|
||||
({ one }) => ({
|
||||
|
|
@ -3158,6 +3676,16 @@ export const relations_technologies = relations(technologies, ({ many }) => ({
|
|||
relationName: "_rels",
|
||||
}),
|
||||
}));
|
||||
export const relations_assets_skin_configuration_applies_to_asset_types = relations(
|
||||
assets_skin_configuration_applies_to_asset_types,
|
||||
({ one }) => ({
|
||||
parent: one(assets, {
|
||||
fields: [assets_skin_configuration_applies_to_asset_types.parent],
|
||||
references: [assets.id],
|
||||
relationName: "Skin Configuration_appliesToAssetTypes",
|
||||
}),
|
||||
}),
|
||||
);
|
||||
export const relations_assets_crafting_crafting_data_inputs = relations(
|
||||
assets_crafting_crafting_data_inputs,
|
||||
({ one }) => ({
|
||||
|
|
@ -3206,6 +3734,9 @@ export const relations_assets_rels = relations(assets_rels, ({ one }) => ({
|
|||
}),
|
||||
}));
|
||||
export const relations_assets = relations(assets, ({ one, many }) => ({
|
||||
"Skin Configuration_appliesToAssetTypes": many(assets_skin_configuration_applies_to_asset_types, {
|
||||
relationName: "Skin Configuration_appliesToAssetTypes",
|
||||
}),
|
||||
"Asset Metadata_thumbnail": one(media, {
|
||||
fields: [assets["Asset Metadata_thumbnail"]],
|
||||
references: [media.id],
|
||||
|
|
@ -3613,6 +4144,178 @@ export const relations_ledger_entries = relations(ledger_entries, ({ one }) => (
|
|||
relationName: "transaction",
|
||||
}),
|
||||
}));
|
||||
export const relations_locker_storages_items_equipment_attachments = relations(
|
||||
locker_storages_items_equipment_attachments,
|
||||
({ one }) => ({
|
||||
_parentID: one(locker_storages_items, {
|
||||
fields: [locker_storages_items_equipment_attachments._parentID],
|
||||
references: [locker_storages_items.id],
|
||||
relationName: "equipment_attachments",
|
||||
}),
|
||||
asset: one(assets, {
|
||||
fields: [locker_storages_items_equipment_attachments.asset],
|
||||
references: [assets.id],
|
||||
relationName: "asset",
|
||||
}),
|
||||
}),
|
||||
);
|
||||
export const relations_locker_storages_items = relations(
|
||||
locker_storages_items,
|
||||
({ one, many }) => ({
|
||||
_parentID: one(locker_storages, {
|
||||
fields: [locker_storages_items._parentID],
|
||||
references: [locker_storages.id],
|
||||
relationName: "items",
|
||||
}),
|
||||
asset: one(assets, {
|
||||
fields: [locker_storages_items.asset],
|
||||
references: [assets.id],
|
||||
relationName: "asset",
|
||||
}),
|
||||
equipment_attachments: many(locker_storages_items_equipment_attachments, {
|
||||
relationName: "equipment_attachments",
|
||||
}),
|
||||
equipment_skin: one(assets, {
|
||||
fields: [locker_storages_items.equipment_skin],
|
||||
references: [assets.id],
|
||||
relationName: "equipment_skin",
|
||||
}),
|
||||
}),
|
||||
);
|
||||
export const relations_locker_storages = relations(locker_storages, ({ one, many }) => ({
|
||||
ownerUser: one(users, {
|
||||
fields: [locker_storages.ownerUser],
|
||||
references: [users.id],
|
||||
relationName: "ownerUser",
|
||||
}),
|
||||
items: many(locker_storages_items, {
|
||||
relationName: "items",
|
||||
}),
|
||||
}));
|
||||
export const relations_loadouts = relations(loadouts, ({ one }) => ({
|
||||
ownerUser: one(users, {
|
||||
fields: [loadouts.ownerUser],
|
||||
references: [users.id],
|
||||
relationName: "ownerUser",
|
||||
}),
|
||||
slots_primary: one(assets, {
|
||||
fields: [loadouts.slots_primary],
|
||||
references: [assets.id],
|
||||
relationName: "slots_primary",
|
||||
}),
|
||||
slots_secondary: one(assets, {
|
||||
fields: [loadouts.slots_secondary],
|
||||
references: [assets.id],
|
||||
relationName: "slots_secondary",
|
||||
}),
|
||||
slots_launcher: one(assets, {
|
||||
fields: [loadouts.slots_launcher],
|
||||
references: [assets.id],
|
||||
relationName: "slots_launcher",
|
||||
}),
|
||||
slots_uniform: one(assets, {
|
||||
fields: [loadouts.slots_uniform],
|
||||
references: [assets.id],
|
||||
relationName: "slots_uniform",
|
||||
}),
|
||||
slots_vest: one(assets, {
|
||||
fields: [loadouts.slots_vest],
|
||||
references: [assets.id],
|
||||
relationName: "slots_vest",
|
||||
}),
|
||||
slots_backpack: one(assets, {
|
||||
fields: [loadouts.slots_backpack],
|
||||
references: [assets.id],
|
||||
relationName: "slots_backpack",
|
||||
}),
|
||||
slots_helmet: one(assets, {
|
||||
fields: [loadouts.slots_helmet],
|
||||
references: [assets.id],
|
||||
relationName: "slots_helmet",
|
||||
}),
|
||||
slots_facewear: one(assets, {
|
||||
fields: [loadouts.slots_facewear],
|
||||
references: [assets.id],
|
||||
relationName: "slots_facewear",
|
||||
}),
|
||||
slots_nvg: one(assets, {
|
||||
fields: [loadouts.slots_nvg],
|
||||
references: [assets.id],
|
||||
relationName: "slots_nvg",
|
||||
}),
|
||||
slots_radio: one(assets, {
|
||||
fields: [loadouts.slots_radio],
|
||||
references: [assets.id],
|
||||
relationName: "slots_radio",
|
||||
}),
|
||||
slots_optic: one(assets, {
|
||||
fields: [loadouts.slots_optic],
|
||||
references: [assets.id],
|
||||
relationName: "slots_optic",
|
||||
}),
|
||||
slots_muzzle: one(assets, {
|
||||
fields: [loadouts.slots_muzzle],
|
||||
references: [assets.id],
|
||||
relationName: "slots_muzzle",
|
||||
}),
|
||||
slots_bipod: one(assets, {
|
||||
fields: [loadouts.slots_bipod],
|
||||
references: [assets.id],
|
||||
relationName: "slots_bipod",
|
||||
}),
|
||||
}));
|
||||
export const relations_market_listings = relations(market_listings, ({ one }) => ({
|
||||
asset: one(assets, {
|
||||
fields: [market_listings.asset],
|
||||
references: [assets.id],
|
||||
relationName: "asset",
|
||||
}),
|
||||
seller: one(users, {
|
||||
fields: [market_listings.seller],
|
||||
references: [users.id],
|
||||
relationName: "seller",
|
||||
}),
|
||||
npc: one(game_npcs, {
|
||||
fields: [market_listings.npc],
|
||||
references: [game_npcs.id],
|
||||
relationName: "npc",
|
||||
}),
|
||||
currency: one(resources, {
|
||||
fields: [market_listings.currency],
|
||||
references: [resources.id],
|
||||
relationName: "currency",
|
||||
}),
|
||||
buyer: one(users, {
|
||||
fields: [market_listings.buyer],
|
||||
references: [users.id],
|
||||
relationName: "buyer",
|
||||
}),
|
||||
}));
|
||||
export const relations_market_negotiations_history = relations(
|
||||
market_negotiations_history,
|
||||
({ one }) => ({
|
||||
_parentID: one(market_negotiations, {
|
||||
fields: [market_negotiations_history._parentID],
|
||||
references: [market_negotiations.id],
|
||||
relationName: "history",
|
||||
}),
|
||||
}),
|
||||
);
|
||||
export const relations_market_negotiations = relations(market_negotiations, ({ one, many }) => ({
|
||||
listing: one(market_listings, {
|
||||
fields: [market_negotiations.listing],
|
||||
references: [market_listings.id],
|
||||
relationName: "listing",
|
||||
}),
|
||||
buyer: one(users, {
|
||||
fields: [market_negotiations.buyer],
|
||||
references: [users.id],
|
||||
relationName: "buyer",
|
||||
}),
|
||||
history: many(market_negotiations_history, {
|
||||
relationName: "history",
|
||||
}),
|
||||
}));
|
||||
export const relations_maps = relations(maps, () => ({}));
|
||||
export const relations_narrative_events = relations(narrative_events, () => ({}));
|
||||
export const relations_mission_files = relations(mission_files, ({ one }) => ({
|
||||
|
|
@ -3658,6 +4361,11 @@ export const relations_payload_locked_documents_rels = relations(
|
|||
references: [game_vehicles.id],
|
||||
relationName: "game-vehicles",
|
||||
}),
|
||||
"game-npcsID": one(game_npcs, {
|
||||
fields: [payload_locked_documents_rels["game-npcsID"]],
|
||||
references: [game_npcs.id],
|
||||
relationName: "game-npcs",
|
||||
}),
|
||||
"game-event-logsID": one(game_event_logs, {
|
||||
fields: [payload_locked_documents_rels["game-event-logsID"]],
|
||||
references: [game_event_logs.id],
|
||||
|
|
@ -3698,6 +4406,11 @@ export const relations_payload_locked_documents_rels = relations(
|
|||
references: [experience.id],
|
||||
relationName: "experience",
|
||||
}),
|
||||
"user-notificationsID": one(user_notifications, {
|
||||
fields: [payload_locked_documents_rels["user-notificationsID"]],
|
||||
references: [user_notifications.id],
|
||||
relationName: "user-notifications",
|
||||
}),
|
||||
missionsID: one(missions, {
|
||||
fields: [payload_locked_documents_rels.missionsID],
|
||||
references: [missions.id],
|
||||
|
|
@ -3758,6 +4471,26 @@ export const relations_payload_locked_documents_rels = relations(
|
|||
references: [ledger_entries.id],
|
||||
relationName: "ledger-entries",
|
||||
}),
|
||||
"locker-storagesID": one(locker_storages, {
|
||||
fields: [payload_locked_documents_rels["locker-storagesID"]],
|
||||
references: [locker_storages.id],
|
||||
relationName: "locker-storages",
|
||||
}),
|
||||
loadoutsID: one(loadouts, {
|
||||
fields: [payload_locked_documents_rels.loadoutsID],
|
||||
references: [loadouts.id],
|
||||
relationName: "loadouts",
|
||||
}),
|
||||
"market-listingsID": one(market_listings, {
|
||||
fields: [payload_locked_documents_rels["market-listingsID"]],
|
||||
references: [market_listings.id],
|
||||
relationName: "market-listings",
|
||||
}),
|
||||
"market-negotiationsID": one(market_negotiations, {
|
||||
fields: [payload_locked_documents_rels["market-negotiationsID"]],
|
||||
references: [market_negotiations.id],
|
||||
relationName: "market-negotiations",
|
||||
}),
|
||||
mapsID: one(maps, {
|
||||
fields: [payload_locked_documents_rels.mapsID],
|
||||
references: [maps.id],
|
||||
|
|
@ -3850,6 +4583,7 @@ type DatabaseSchema = {
|
|||
enum_factions_type: typeof enum_factions_type;
|
||||
enum_technologies_approval_status: typeof enum_technologies_approval_status;
|
||||
enum_technologies_type: typeof enum_technologies_type;
|
||||
enum_assets_skin_configuration_applies_to_asset_types: typeof enum_assets_skin_configuration_applies_to_asset_types;
|
||||
enum_assets_approval_status: typeof enum_assets_approval_status;
|
||||
enum_assets_asset_type: typeof enum_assets_asset_type;
|
||||
enum_assets_weapon_configuration_slot_type: typeof enum_assets_weapon_configuration_slot_type;
|
||||
|
|
@ -3872,6 +4606,10 @@ type DatabaseSchema = {
|
|||
enum_bank_transactions_type: typeof enum_bank_transactions_type;
|
||||
enum_bank_transactions_status: typeof enum_bank_transactions_status;
|
||||
enum_ledger_entries_type: typeof enum_ledger_entries_type;
|
||||
enum_market_listings_status: typeof enum_market_listings_status;
|
||||
enum_market_negotiations_history_from: typeof enum_market_negotiations_history_from;
|
||||
enum_market_negotiations_status: typeof enum_market_negotiations_status;
|
||||
enum_market_negotiations_proposed_by: typeof enum_market_negotiations_proposed_by;
|
||||
enum_narrative_events_triggers_type: typeof enum_narrative_events_triggers_type;
|
||||
media: typeof media;
|
||||
game_hard_resources: typeof game_hard_resources;
|
||||
|
|
@ -3881,6 +4619,8 @@ type DatabaseSchema = {
|
|||
game_vehicles_stored_resources: typeof game_vehicles_stored_resources;
|
||||
game_vehicles_void_storage: typeof game_vehicles_void_storage;
|
||||
game_vehicles: typeof game_vehicles;
|
||||
game_npcs: typeof game_npcs;
|
||||
game_npcs_rels: typeof game_npcs_rels;
|
||||
game_event_logs: typeof game_event_logs;
|
||||
users_roles: typeof users_roles;
|
||||
users_sessions: typeof users_sessions;
|
||||
|
|
@ -3893,6 +4633,7 @@ type DatabaseSchema = {
|
|||
assignments: typeof assignments;
|
||||
assignments_rels: typeof assignments_rels;
|
||||
experience: typeof experience;
|
||||
user_notifications: typeof user_notifications;
|
||||
missions_mission_roles_provided_roles: typeof missions_mission_roles_provided_roles;
|
||||
missions_briefing: typeof missions_briefing;
|
||||
missions_mission_objectives: typeof missions_mission_objectives;
|
||||
|
|
@ -3910,6 +4651,7 @@ type DatabaseSchema = {
|
|||
technologies_research_costs_resources: typeof technologies_research_costs_resources;
|
||||
technologies: typeof technologies;
|
||||
technologies_rels: typeof technologies_rels;
|
||||
assets_skin_configuration_applies_to_asset_types: typeof assets_skin_configuration_applies_to_asset_types;
|
||||
assets_crafting_crafting_data_inputs: typeof assets_crafting_crafting_data_inputs;
|
||||
assets_crafting_crafting_data_byproducts: typeof assets_crafting_crafting_data_byproducts;
|
||||
assets: typeof assets;
|
||||
|
|
@ -3938,6 +4680,13 @@ type DatabaseSchema = {
|
|||
bank_accounts: typeof bank_accounts;
|
||||
bank_transactions: typeof bank_transactions;
|
||||
ledger_entries: typeof ledger_entries;
|
||||
locker_storages_items_equipment_attachments: typeof locker_storages_items_equipment_attachments;
|
||||
locker_storages_items: typeof locker_storages_items;
|
||||
locker_storages: typeof locker_storages;
|
||||
loadouts: typeof loadouts;
|
||||
market_listings: typeof market_listings;
|
||||
market_negotiations_history: typeof market_negotiations_history;
|
||||
market_negotiations: typeof market_negotiations;
|
||||
maps: typeof maps;
|
||||
narrative_events: typeof narrative_events;
|
||||
mission_files: typeof mission_files;
|
||||
|
|
@ -3958,6 +4707,8 @@ type DatabaseSchema = {
|
|||
relations_game_vehicles_stored_resources: typeof relations_game_vehicles_stored_resources;
|
||||
relations_game_vehicles_void_storage: typeof relations_game_vehicles_void_storage;
|
||||
relations_game_vehicles: typeof relations_game_vehicles;
|
||||
relations_game_npcs_rels: typeof relations_game_npcs_rels;
|
||||
relations_game_npcs: typeof relations_game_npcs;
|
||||
relations_game_event_logs: typeof relations_game_event_logs;
|
||||
relations_users_roles: typeof relations_users_roles;
|
||||
relations_users_sessions: typeof relations_users_sessions;
|
||||
|
|
@ -3970,6 +4721,7 @@ type DatabaseSchema = {
|
|||
relations_assignments_rels: typeof relations_assignments_rels;
|
||||
relations_assignments: typeof relations_assignments;
|
||||
relations_experience: typeof relations_experience;
|
||||
relations_user_notifications: typeof relations_user_notifications;
|
||||
relations_missions_mission_roles_provided_roles: typeof relations_missions_mission_roles_provided_roles;
|
||||
relations_missions_briefing: typeof relations_missions_briefing;
|
||||
relations_missions_mission_objectives: typeof relations_missions_mission_objectives;
|
||||
|
|
@ -3987,6 +4739,7 @@ type DatabaseSchema = {
|
|||
relations_technologies_research_costs_resources: typeof relations_technologies_research_costs_resources;
|
||||
relations_technologies_rels: typeof relations_technologies_rels;
|
||||
relations_technologies: typeof relations_technologies;
|
||||
relations_assets_skin_configuration_applies_to_asset_types: typeof relations_assets_skin_configuration_applies_to_asset_types;
|
||||
relations_assets_crafting_crafting_data_inputs: typeof relations_assets_crafting_crafting_data_inputs;
|
||||
relations_assets_crafting_crafting_data_byproducts: typeof relations_assets_crafting_crafting_data_byproducts;
|
||||
relations_assets_rels: typeof relations_assets_rels;
|
||||
|
|
@ -4015,6 +4768,13 @@ type DatabaseSchema = {
|
|||
relations_bank_accounts: typeof relations_bank_accounts;
|
||||
relations_bank_transactions: typeof relations_bank_transactions;
|
||||
relations_ledger_entries: typeof relations_ledger_entries;
|
||||
relations_locker_storages_items_equipment_attachments: typeof relations_locker_storages_items_equipment_attachments;
|
||||
relations_locker_storages_items: typeof relations_locker_storages_items;
|
||||
relations_locker_storages: typeof relations_locker_storages;
|
||||
relations_loadouts: typeof relations_loadouts;
|
||||
relations_market_listings: typeof relations_market_listings;
|
||||
relations_market_negotiations_history: typeof relations_market_negotiations_history;
|
||||
relations_market_negotiations: typeof relations_market_negotiations;
|
||||
relations_maps: typeof relations_maps;
|
||||
relations_narrative_events: typeof relations_narrative_events;
|
||||
relations_mission_files: typeof relations_mission_files;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ export interface Config {
|
|||
'game-hard-resources': GameHardResource;
|
||||
'game-structures': GameStructure;
|
||||
'game-vehicles': GameVehicle;
|
||||
'game-npcs': GameNpc;
|
||||
'game-event-logs': GameEventLog;
|
||||
users: User;
|
||||
ranks: Rank;
|
||||
|
|
@ -79,6 +80,7 @@ export interface Config {
|
|||
qualifications: Qualification;
|
||||
assignments: Assignment;
|
||||
experience: Experience;
|
||||
'user-notifications': UserNotification;
|
||||
missions: Mission;
|
||||
campaigns: Campaign;
|
||||
factions: Faction;
|
||||
|
|
@ -93,6 +95,8 @@ export interface Config {
|
|||
'ledger-entries': LedgerEntry;
|
||||
'locker-storages': LockerStorage;
|
||||
loadouts: Loadout;
|
||||
'market-listings': MarketListing;
|
||||
'market-negotiations': MarketNegotiation;
|
||||
maps: Map;
|
||||
'narrative-events': NarrativeEvent;
|
||||
'mission-files': MissionFile;
|
||||
|
|
@ -115,6 +119,7 @@ export interface Config {
|
|||
'game-hard-resources': GameHardResourcesSelect<false> | GameHardResourcesSelect<true>;
|
||||
'game-structures': GameStructuresSelect<false> | GameStructuresSelect<true>;
|
||||
'game-vehicles': GameVehiclesSelect<false> | GameVehiclesSelect<true>;
|
||||
'game-npcs': GameNpcsSelect<false> | GameNpcsSelect<true>;
|
||||
'game-event-logs': GameEventLogsSelect<false> | GameEventLogsSelect<true>;
|
||||
users: UsersSelect<false> | UsersSelect<true>;
|
||||
ranks: RanksSelect<false> | RanksSelect<true>;
|
||||
|
|
@ -123,6 +128,7 @@ export interface Config {
|
|||
qualifications: QualificationsSelect<false> | QualificationsSelect<true>;
|
||||
assignments: AssignmentsSelect<false> | AssignmentsSelect<true>;
|
||||
experience: ExperienceSelect<false> | ExperienceSelect<true>;
|
||||
'user-notifications': UserNotificationsSelect<false> | UserNotificationsSelect<true>;
|
||||
missions: MissionsSelect<false> | MissionsSelect<true>;
|
||||
campaigns: CampaignsSelect<false> | CampaignsSelect<true>;
|
||||
factions: FactionsSelect<false> | FactionsSelect<true>;
|
||||
|
|
@ -137,6 +143,8 @@ export interface Config {
|
|||
'ledger-entries': LedgerEntriesSelect<false> | LedgerEntriesSelect<true>;
|
||||
'locker-storages': LockerStoragesSelect<false> | LockerStoragesSelect<true>;
|
||||
loadouts: LoadoutsSelect<false> | LoadoutsSelect<true>;
|
||||
'market-listings': MarketListingsSelect<false> | MarketListingsSelect<true>;
|
||||
'market-negotiations': MarketNegotiationsSelect<false> | MarketNegotiationsSelect<true>;
|
||||
maps: MapsSelect<false> | MapsSelect<true>;
|
||||
'narrative-events': NarrativeEventsSelect<false> | NarrativeEventsSelect<true>;
|
||||
'mission-files': MissionFilesSelect<false> | MissionFilesSelect<true>;
|
||||
|
|
@ -1090,6 +1098,57 @@ export interface GameVehicle {
|
|||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "game-npcs".
|
||||
*/
|
||||
export interface GameNpc {
|
||||
id: number;
|
||||
/**
|
||||
* The NPC's name as shown in-game and on the frontend.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* What this NPC does (e.g. 'Weapons Dealer', 'Field Medic').
|
||||
*/
|
||||
occupation?: string | null;
|
||||
/**
|
||||
* Where this NPC is stationed in-game.
|
||||
*/
|
||||
location?: (number | null) | GameStructure;
|
||||
/**
|
||||
* The faction this NPC belongs to, if any.
|
||||
*/
|
||||
faction?: (number | null) | Faction;
|
||||
/**
|
||||
* A short background/profile for this NPC.
|
||||
*/
|
||||
bio?: string | null;
|
||||
/**
|
||||
* True for NPCs auto-created by the market tick to cover unstocked goods. They are placeholders until included in the game.
|
||||
*/
|
||||
isGenerated?: boolean | null;
|
||||
/**
|
||||
* Whether this NPC is officially part of the game. Generated NPCs start off; flip this on to include them.
|
||||
*/
|
||||
isInGame?: boolean | null;
|
||||
vendor?: {
|
||||
/**
|
||||
* Whether this NPC runs a market stall. Auto-generated vendor stock is attributed to them.
|
||||
*/
|
||||
enabled?: boolean | null;
|
||||
/**
|
||||
* Multiplies the auto-generated price for this NPC's stock (1 = base market price).
|
||||
*/
|
||||
priceModifier?: number | null;
|
||||
/**
|
||||
* The goods this NPC sells. The market tick prefers these NPCs when stocking those assets.
|
||||
*/
|
||||
sells?: (number | Asset)[] | null;
|
||||
};
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "game-event-logs".
|
||||
|
|
@ -1112,6 +1171,7 @@ export interface GameEventLog {
|
|||
| (
|
||||
| 'game-structures'
|
||||
| 'game-vehicles'
|
||||
| 'game-npcs'
|
||||
| 'structures'
|
||||
| 'resources'
|
||||
| 'assets'
|
||||
|
|
@ -1128,6 +1188,8 @@ export interface GameEventLog {
|
|||
| 'ledger-entries'
|
||||
| 'locker-storages'
|
||||
| 'loadouts'
|
||||
| 'market-listings'
|
||||
| 'market-negotiations'
|
||||
)
|
||||
| null;
|
||||
targetId?: number | null;
|
||||
|
|
@ -1364,6 +1426,27 @@ export interface Experience {
|
|||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "user-notifications".
|
||||
*/
|
||||
export interface UserNotification {
|
||||
id: number;
|
||||
user: number | User;
|
||||
/**
|
||||
* Machine-readable notification type, e.g. `market:offer`.
|
||||
*/
|
||||
type?: string | null;
|
||||
title: string;
|
||||
message?: string | null;
|
||||
/**
|
||||
* Optional internal path to navigate to when clicked.
|
||||
*/
|
||||
link?: string | null;
|
||||
read?: boolean | null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "missions".
|
||||
|
|
@ -1917,6 +2000,103 @@ export interface Loadout {
|
|||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "market-listings".
|
||||
*/
|
||||
export interface MarketListing {
|
||||
id: number;
|
||||
/**
|
||||
* The asset being offered for sale.
|
||||
*/
|
||||
asset: number | Asset;
|
||||
/**
|
||||
* The user who listed this item. Null for auto-generated market entries (NPC stock).
|
||||
*/
|
||||
seller?: (number | null) | User;
|
||||
/**
|
||||
* The NPC stocking this entry. Auto-generated market entries are attributed to an NPC instead of a user.
|
||||
*/
|
||||
npc?: (number | null) | GameNpc;
|
||||
quantity: number;
|
||||
/**
|
||||
* Price per single unit, in the market currency.
|
||||
*/
|
||||
price: number;
|
||||
/**
|
||||
* The seller's target price during negotiations. Defaults to the asking price.
|
||||
*/
|
||||
desiredPrice?: number | null;
|
||||
/**
|
||||
* The lowest per-unit price the seller will accept. When set below the asking price, the listing is negotiable.
|
||||
*/
|
||||
minPrice?: number | null;
|
||||
/**
|
||||
* The currency this listing is priced in. Defaults to the main campaign currency.
|
||||
*/
|
||||
currency?: (number | null) | Resource;
|
||||
status: 'active' | 'sold' | 'cancelled' | 'expired';
|
||||
/**
|
||||
* True for system-generated NPC entries. Auto-generated entries have no seller; proceeds go to the unit treasury.
|
||||
*/
|
||||
isAutoGenerated?: boolean | null;
|
||||
listedAt: string;
|
||||
/**
|
||||
* When this listing expires. Expired user listings have their stock returned to the seller; auto-generated entries simply close.
|
||||
*/
|
||||
expiresAt?: string | null;
|
||||
soldAt?: string | null;
|
||||
/**
|
||||
* The user who purchased this listing.
|
||||
*/
|
||||
buyer?: (number | null) | User;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "market-negotiations".
|
||||
*/
|
||||
export interface MarketNegotiation {
|
||||
id: number;
|
||||
/**
|
||||
* The market listing this negotiation thread belongs to.
|
||||
*/
|
||||
listing: number | MarketListing;
|
||||
/**
|
||||
* The player interested in buying the listing.
|
||||
*/
|
||||
buyer: number | User;
|
||||
status: 'open' | 'accepted' | 'rejected' | 'closed' | 'cancelled' | 'expired';
|
||||
/**
|
||||
* NPC vendor patience (0–100). Rises each bargaining round and sharply for lowball offers; at 100 the negotiation closes and the buyer can only buy at the asking price.
|
||||
*/
|
||||
patience?: number | null;
|
||||
/**
|
||||
* How many units the buyer wants from the listing.
|
||||
*/
|
||||
quantity?: number | null;
|
||||
/**
|
||||
* The per-unit price currently on the table. Proposed by the buyer or the seller depending on the proposal.
|
||||
*/
|
||||
amount: number;
|
||||
proposedBy: 'buyer' | 'seller';
|
||||
/**
|
||||
* The per-unit price agreed when the negotiation is accepted.
|
||||
*/
|
||||
acceptedPrice?: number | null;
|
||||
history?:
|
||||
| {
|
||||
amount: number;
|
||||
from: 'buyer' | 'seller';
|
||||
note?: string | null;
|
||||
at: string;
|
||||
id?: string | null;
|
||||
}[]
|
||||
| null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "narrative-events".
|
||||
|
|
@ -1998,6 +2178,10 @@ export interface PayloadLockedDocument {
|
|||
relationTo: 'game-vehicles';
|
||||
value: number | GameVehicle;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'game-npcs';
|
||||
value: number | GameNpc;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'game-event-logs';
|
||||
value: number | GameEventLog;
|
||||
|
|
@ -2030,6 +2214,10 @@ export interface PayloadLockedDocument {
|
|||
relationTo: 'experience';
|
||||
value: number | Experience;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'user-notifications';
|
||||
value: number | UserNotification;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'missions';
|
||||
value: number | Mission;
|
||||
|
|
@ -2086,6 +2274,14 @@ export interface PayloadLockedDocument {
|
|||
relationTo: 'loadouts';
|
||||
value: number | Loadout;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'market-listings';
|
||||
value: number | MarketListing;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'market-negotiations';
|
||||
value: number | MarketNegotiation;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'maps';
|
||||
value: number | Map;
|
||||
|
|
@ -2240,6 +2436,28 @@ export interface GameVehiclesSelect<T extends boolean = true> {
|
|||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "game-npcs_select".
|
||||
*/
|
||||
export interface GameNpcsSelect<T extends boolean = true> {
|
||||
name?: T;
|
||||
occupation?: T;
|
||||
location?: T;
|
||||
faction?: T;
|
||||
bio?: T;
|
||||
isGenerated?: T;
|
||||
isInGame?: T;
|
||||
vendor?:
|
||||
| T
|
||||
| {
|
||||
enabled?: T;
|
||||
priceModifier?: T;
|
||||
sells?: T;
|
||||
};
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "game-event-logs_select".
|
||||
|
|
@ -2394,6 +2612,20 @@ export interface ExperienceSelect<T extends boolean = true> {
|
|||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "user-notifications_select".
|
||||
*/
|
||||
export interface UserNotificationsSelect<T extends boolean = true> {
|
||||
user?: T;
|
||||
type?: T;
|
||||
title?: T;
|
||||
message?: T;
|
||||
link?: T;
|
||||
read?: T;
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "missions_select".
|
||||
|
|
@ -3006,6 +3238,53 @@ export interface LoadoutsSelect<T extends boolean = true> {
|
|||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "market-listings_select".
|
||||
*/
|
||||
export interface MarketListingsSelect<T extends boolean = true> {
|
||||
asset?: T;
|
||||
seller?: T;
|
||||
npc?: T;
|
||||
quantity?: T;
|
||||
price?: T;
|
||||
desiredPrice?: T;
|
||||
minPrice?: T;
|
||||
currency?: T;
|
||||
status?: T;
|
||||
isAutoGenerated?: T;
|
||||
listedAt?: T;
|
||||
expiresAt?: T;
|
||||
soldAt?: T;
|
||||
buyer?: T;
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "market-negotiations_select".
|
||||
*/
|
||||
export interface MarketNegotiationsSelect<T extends boolean = true> {
|
||||
listing?: T;
|
||||
buyer?: T;
|
||||
status?: T;
|
||||
patience?: T;
|
||||
quantity?: T;
|
||||
amount?: T;
|
||||
proposedBy?: T;
|
||||
acceptedPrice?: T;
|
||||
history?:
|
||||
| T
|
||||
| {
|
||||
amount?: T;
|
||||
from?: T;
|
||||
note?: T;
|
||||
at?: T;
|
||||
id?: T;
|
||||
};
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "maps_select".
|
||||
|
|
|
|||
Loading…
Reference in a new issue