Add initial project files
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { belongsTo } from '@adonisjs/lucid/orm'
|
||||
import type { BelongsTo } from '@adonisjs/lucid/types/relations'
|
||||
import WebPage from '#base_modules/WebManager/model/web_page'
|
||||
import type { BlockData, BlockType } from '#base_modules/WebManager/types/web_content'
|
||||
import { WebComponentSchema } from '#database/schema'
|
||||
|
||||
export default class WebComponent extends WebComponentSchema {
|
||||
static table = 'web_components'
|
||||
|
||||
declare type: BlockType
|
||||
declare data: BlockData
|
||||
|
||||
@belongsTo(() => WebPage, { foreignKey: 'pageId' })
|
||||
declare page: BelongsTo<typeof WebPage>
|
||||
}
|
||||
Reference in New Issue
Block a user