mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Add tags pivot in projects
This commit is contained in:
@@ -19,11 +19,13 @@ export default class Project extends BaseModel {
|
||||
@column()
|
||||
public url: string
|
||||
|
||||
@belongsTo(() => File)
|
||||
public file: BelongsTo<typeof File>
|
||||
@belongsTo(() => File, {
|
||||
foreignKey: 'coverId'
|
||||
})
|
||||
public cover: BelongsTo<typeof File>
|
||||
|
||||
@column()
|
||||
public fileId: number
|
||||
public coverId: number
|
||||
|
||||
@manyToMany(() => Tag)
|
||||
public tags: ManyToMany<typeof Tag>
|
||||
|
||||
Reference in New Issue
Block a user