Initial commit: AutonetSellCar platform with deployment system
- Frontend: Next.js 14 with TypeScript - Backend: FastAPI with SQLAlchemy - Agent: Carmodoo sync agent - Deployment: Docker Compose based staging/production setup - Scripts: Automated deployment with rollback support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
67
backend/app/models/hero_banner.py
Normal file
67
backend/app/models/hero_banner.py
Normal file
@@ -0,0 +1,67 @@
|
||||
from sqlalchemy import Column, Integer, String, Boolean, DateTime, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.sql import func
|
||||
from ..database import Base
|
||||
|
||||
|
||||
class HeroBannerSettings(Base):
|
||||
"""히어로 배너 슬라이더 설정"""
|
||||
__tablename__ = "hero_banner_settings"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
|
||||
# 슬라이드 전환 간격 (밀리초)
|
||||
slide_interval = Column(Integer, default=3000) # 3초
|
||||
|
||||
# 애니메이션 타입: 'film-strip', 'fade', 'slide'
|
||||
animation_type = Column(String(20), default="film-strip")
|
||||
|
||||
# 이미지 크기
|
||||
image_width = Column(Integer, default=500)
|
||||
image_height = Column(Integer, default=300)
|
||||
|
||||
# 자동 재생 여부
|
||||
auto_play = Column(Boolean, default=True)
|
||||
|
||||
# 타임스탬프
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
|
||||
|
||||
class HeroBanner(Base):
|
||||
"""히어로 배너 이미지"""
|
||||
__tablename__ = "hero_banners"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
|
||||
# 다국어 제목
|
||||
title_ko = Column(String(100))
|
||||
title_en = Column(String(100))
|
||||
title_mn = Column(String(100)) # 몽골어
|
||||
|
||||
# 다국어 서브타이틀
|
||||
subtitle_ko = Column(String(200))
|
||||
subtitle_en = Column(String(200))
|
||||
subtitle_mn = Column(String(200))
|
||||
|
||||
# 이미지 URL
|
||||
image_url = Column(String(500), nullable=False)
|
||||
|
||||
# 클릭 시 이동 URL (선택)
|
||||
link_url = Column(String(500))
|
||||
|
||||
# 연결된 차량 ID (선택 - 차량 상세 페이지로 연결)
|
||||
car_id = Column(Integer, ForeignKey("cars.id", ondelete="SET NULL"), nullable=True)
|
||||
|
||||
# 활성화 여부
|
||||
is_active = Column(Boolean, default=True)
|
||||
|
||||
# 표시 순서 (낮을수록 먼저)
|
||||
display_order = Column(Integer, default=0)
|
||||
|
||||
# 타임스탬프
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
|
||||
# 관계
|
||||
car = relationship("Car", foreign_keys=[car_id])
|
||||
Reference in New Issue
Block a user