import { belongsTo } from '@adonisjs/lucid/orm' import type { BelongsTo } from '@adonisjs/lucid/types/relations' import { ScrapedPartSchema } from '#database/schema' import ComponentType from '#models/component_type' export default class ScrapedPart extends ScrapedPartSchema { @belongsTo(() => ComponentType, { foreignKey: 'typeId', }) declare type: BelongsTo }