feat: add internal endpoint to create banner

This commit is contained in:
2026-03-02 22:09:33 +07:00
parent 90655dcf92
commit 960493f414
6 changed files with 81 additions and 2 deletions

View File

@ -257,6 +257,7 @@ Table users {
create_languages languages [not null]
user_create_email email_system_accounts [not null]
user_emails email_system_histories [not null]
user_hero_banner hero_banner [not null]
sys_notifications system_notifications [not null]
sys_logs system_logs [not null]
}
@ -492,6 +493,22 @@ Table email_system_histories {
updatedAt DateTime [default: `now()`, not null]
}
Table hero_banner {
id String [pk]
isClickable Boolean [not null, default: false]
title String
description String
buttonContent String
buttonLink String
imageUrl String
startDate DateTime [not null]
endDate DateTime [not null]
createdAt DateTime [default: `now()`, not null]
updatedAt DateTime [default: `now()`, not null]
creatorId String [not null]
createdBy users [not null]
}
Table system_preferences {
id String [pk]
key String [not null]
@ -761,6 +778,8 @@ Ref: email_system_accounts.createdBy > users.id
Ref: email_system_histories.userRelated > users.id
Ref: hero_banner.creatorId > users.id
Ref: system_notifications.createdBy > users.id
Ref: system_logs.relatedUser > users.id

View File

@ -564,7 +564,7 @@ model HeroBanner {
imageUrl String? @db.Text
startDate DateTime
endDate DateTime
createdAt DateTime @default(now())
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
creatorId String @db.Uuid
createdBy User @relation("UserHeroBanner", fields: [creatorId], references: [id])