Add initial project files

This commit is contained in:
Igor Martyniuk
2026-09-01 13:03:41 +03:00
parent 22e111bb44
commit 74cb5b6176
1841 changed files with 242819 additions and 30 deletions
@@ -0,0 +1,20 @@
import { hasMany, hasOne } from '@adonisjs/lucid/orm'
import type { HasMany, HasOne } from '@adonisjs/lucid/types/relations'
import WebComponent from '#base_modules/WebManager/model/web_component'
import type { Hero, PageType } from '#base_modules/WebManager/types/web_content'
import type { PageStatus } from '#base_modules/WebManager/types/page_status'
import { WebPageSchema } from '#database/schema'
export default class WebPage extends WebPageSchema {
static table = 'web_pages'
declare status: PageStatus
declare pageType: PageType
declare hero: Hero | null
@hasMany(() => WebComponent, { foreignKey: 'pageId' })
declare components: HasMany<typeof WebComponent>
@hasOne(() => WebPage, { foreignKey: 'draftOfId' })
declare draft: HasOne<typeof WebPage>
}