mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
27 lines
580 B
TypeScript
27 lines
580 B
TypeScript
import { DateTime } from 'luxon'
|
|
import {BaseModel, BelongsTo, belongsTo, column} from '@ioc:Adonis/Lucid/Orm'
|
|
import File from "App/Models/File";
|
|
|
|
export default class Skill extends BaseModel {
|
|
@column({ isPrimary: true })
|
|
public id: number
|
|
|
|
@column()
|
|
public name: string
|
|
|
|
@belongsTo(() => File)
|
|
public file: BelongsTo<typeof File>
|
|
|
|
@column()
|
|
public fileId: number
|
|
|
|
@column()
|
|
public color: string
|
|
|
|
@column.dateTime({ autoCreate: true })
|
|
public createdAt: DateTime
|
|
|
|
@column.dateTime({ autoCreate: true, autoUpdate: true })
|
|
public updatedAt: DateTime
|
|
}
|