Initial commit: PC Builder AdonisJS project

This commit is contained in:
Kevin
2026-06-28 10:41:51 +02:00
commit 648d0af538
144 changed files with 18570 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
import { DateTime } from 'luxon'
import { BaseModel, belongsTo, column } from '@adonisjs/lucid/orm'
import Computer from '#models/computer'
import type { BelongsTo } from '@adonisjs/lucid/types/relations'
export default class ComputerPicture extends BaseModel {
@column({ isPrimary: true })
declare id: number
@column()
declare computerId: number
@column()
declare link: string
@column()
declare order: number
@belongsTo(() => Computer)
declare computer: BelongsTo<typeof Computer>
@column.dateTime({ autoCreate: true })
declare createdAt: DateTime
@column.dateTime({ autoCreate: true, autoUpdate: true })
declare updatedAt: DateTime | null
}