[feat] add Artist field, and name cleanup
This commit is contained in:
@@ -10,7 +10,7 @@ import EnergyIcon from './EnergyIcon.astro';
|
||||
const { query } = Astro.props;
|
||||
const searchResults = await client.collections('cards').documents().search({
|
||||
q: query,
|
||||
query_by: 'productLineName,productName,setName,number,rarityName',
|
||||
query_by: 'productLineName,productName,setName,number,rarityName,Artist',
|
||||
per_page: 250,
|
||||
});
|
||||
const productIds = searchResults.hits?.map((hit: any) => hit.document.productId) ?? [];
|
||||
|
||||
@@ -2,6 +2,7 @@ import { mysqlTable, int, varchar, boolean, decimal, datetime, index } from "dri
|
||||
|
||||
export const cards = mysqlTable("cards", {
|
||||
productId: int().primaryKey(),
|
||||
originalProductName: varchar({ length: 255 }).default("").notNull(),
|
||||
productName: varchar({ length: 255 }).notNull(),
|
||||
productLineName: varchar({ length: 255 }).default("").notNull(),
|
||||
productLineUrlName: varchar({ length: 255 }).default("").notNull(),
|
||||
@@ -37,6 +38,7 @@ export const cards = mysqlTable("cards", {
|
||||
retreatCost: varchar({ length: 100 }),
|
||||
stage: varchar({ length: 100 }),
|
||||
weakness: varchar({ length: 100 }),
|
||||
Artist: varchar({ length: 255 }),
|
||||
});
|
||||
|
||||
export const sets = mysqlTable("sets", {
|
||||
|
||||
Reference in New Issue
Block a user