TASKS-1823 WebManager module

This commit is contained in:
Igor Martyniuk
2026-08-28 08:35:58 +00:00
parent fdb2cf3837
commit c93d8c025b
654 changed files with 26232 additions and 6075 deletions
@@ -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>
}
@@ -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>
}
@@ -0,0 +1,10 @@
import type { SiteSettingsContent } from '#base_modules/WebManager/types/web_content'
import { WebSettingSchema } from '#database/schema'
export default class WebSetting extends WebSettingSchema {
static table = 'web_settings'
declare header: SiteSettingsContent['header']
declare footer: SiteSettingsContent['footer']
declare legal: SiteSettingsContent['legal']
}