mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-29 19:10:28 +01:00
Change hasone to belongsto
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import {DateTime} from 'luxon'
|
import {DateTime} from 'luxon'
|
||||||
import {BaseModel, BelongsTo, belongsTo, column, HasOne, hasOne} from '@ioc:Adonis/Lucid/Orm'
|
import {BaseModel, BelongsTo, belongsTo, column} from '@ioc:Adonis/Lucid/Orm'
|
||||||
import File from "App/Models/File";
|
import File from "App/Models/File";
|
||||||
import Translation from "App/Models/Translation";
|
import Translation from "App/Models/Translation";
|
||||||
|
|
||||||
@@ -19,8 +19,8 @@ export default class Announce extends BaseModel {
|
|||||||
@column()
|
@column()
|
||||||
public translationId: number
|
public translationId: number
|
||||||
|
|
||||||
@hasOne(() => File)
|
@belongsTo(() => File)
|
||||||
public cover: HasOne<typeof File>
|
public cover: BelongsTo<typeof File>
|
||||||
|
|
||||||
@column()
|
@column()
|
||||||
public fileId: number
|
public fileId: number
|
||||||
|
|||||||
Reference in New Issue
Block a user