mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-25 01:00:28 +01:00
Fix projects descriptions
This commit is contained in:
@@ -2,6 +2,7 @@ import {DateTime} from 'luxon'
|
||||
import {BaseModel, BelongsTo, belongsTo, column, ManyToMany, manyToMany} from '@ioc:Adonis/Lucid/Orm'
|
||||
import File from "App/Models/File";
|
||||
import Tag from "App/Models/Tag";
|
||||
import Translation from "App/Models/Translation";
|
||||
|
||||
export default class Project extends BaseModel {
|
||||
@column({ isPrimary: true })
|
||||
@@ -10,8 +11,13 @@ export default class Project extends BaseModel {
|
||||
@column()
|
||||
public name: string
|
||||
|
||||
@belongsTo(() => Translation, {
|
||||
foreignKey: 'descriptionId'
|
||||
})
|
||||
public description: BelongsTo<typeof Translation>
|
||||
|
||||
@column()
|
||||
public description: string
|
||||
public descriptionId: number
|
||||
|
||||
@column()
|
||||
public progress: number
|
||||
|
||||
Reference in New Issue
Block a user