انتقال تمام محتوای متنی سایت به دیتابیس — همه متنهای فرانتاند از GET /api/site خوانده میشوند
This commit is contained in:
@@ -14,17 +14,43 @@ from ..schemas import (
|
||||
BeforeAfterOut,
|
||||
BrandIn,
|
||||
BrandOut,
|
||||
ContactSectionIn,
|
||||
ContactSectionOut,
|
||||
ContactMessageOut,
|
||||
FaqIn,
|
||||
FaqOut,
|
||||
FooterIn,
|
||||
FooterOut,
|
||||
GalleryImageIn,
|
||||
GalleryImageOut,
|
||||
HeroIn,
|
||||
HeroOut,
|
||||
InvestmentModelIn,
|
||||
InvestmentModelOut,
|
||||
LoginIn,
|
||||
MessageReadIn,
|
||||
NavItemIn,
|
||||
NavItemOut,
|
||||
NewsletterSectionIn,
|
||||
NewsletterOut,
|
||||
OfficeIn,
|
||||
OfficeOut,
|
||||
PageHeroIn,
|
||||
PageHeroOut,
|
||||
ProcessStepIn,
|
||||
ProcessStepOut,
|
||||
ProjectIn,
|
||||
ProjectOut,
|
||||
SectionHeadingIn,
|
||||
SectionHeadingOut,
|
||||
ServiceIn,
|
||||
ServiceOut,
|
||||
StatIn,
|
||||
StatOut,
|
||||
StatusLabelIn,
|
||||
StatusLabelOut,
|
||||
StoryIn,
|
||||
StoryOut,
|
||||
SubscriberOut,
|
||||
TeamMemberIn,
|
||||
TeamMemberOut,
|
||||
@@ -107,6 +133,11 @@ def register_crud(path: str, model, out_schema, create_schema) -> None:
|
||||
|
||||
# CRUD محتوا
|
||||
register_crud("brand", models.Brand, BrandOut, BrandIn)
|
||||
register_crud("nav", models.NavItem, NavItemOut, NavItemIn)
|
||||
register_crud("hero", models.Hero, HeroOut, HeroIn)
|
||||
register_crud("story", models.StorySection, StoryOut, StoryIn)
|
||||
register_crud("section-headings", models.SectionHeadingContent, SectionHeadingOut, SectionHeadingIn)
|
||||
register_crud("page-heroes", models.PageHeroContent, PageHeroOut, PageHeroIn)
|
||||
register_crud("services", models.Service, ServiceOut, ServiceIn)
|
||||
register_crud("projects", models.Project, ProjectOut, ProjectIn)
|
||||
register_crud("articles", models.Article, ArticleOut, ArticleIn)
|
||||
@@ -117,6 +148,14 @@ register_crud("timeline", models.TimelineItem, TimelineItemOut, TimelineItemIn)
|
||||
register_crud("stats", models.Stat, StatOut, StatIn)
|
||||
register_crud("why-us", models.WhyUsItem, WhyUsItemOut, WhyUsItemIn)
|
||||
register_crud("before-after", models.BeforeAfter, BeforeAfterOut, BeforeAfterIn)
|
||||
register_crud("investment-models", models.InvestmentModel, InvestmentModelOut, InvestmentModelIn)
|
||||
register_crud("process-steps", models.ProcessStep, ProcessStepOut, ProcessStepIn)
|
||||
register_crud("offices", models.Office, OfficeOut, OfficeIn)
|
||||
register_crud("gallery", models.GalleryImage, GalleryImageOut, GalleryImageIn)
|
||||
register_crud("status-labels", models.StatusLabel, StatusLabelOut, StatusLabelIn)
|
||||
register_crud("contact-section", models.ContactSectionContent, ContactSectionOut, ContactSectionIn)
|
||||
register_crud("newsletter", models.NewsletterSectionContent, NewsletterOut, NewsletterSectionIn)
|
||||
register_crud("footer", models.FooterContent, FooterOut, FooterIn)
|
||||
|
||||
|
||||
# پیامهای تماس
|
||||
|
||||
Reference in New Issue
Block a user