Skip to content

Commit

Permalink
Merge pull request #148 from 2024-SummerBootcamp-Team/develop
Browse files Browse the repository at this point in the history
Main merge
  • Loading branch information
drghdtjr authored Jul 29, 2024
2 parents d6fe527 + aef41a7 commit 5ce0c82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/models/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ class Character(Base):
prompt = Column(Text, nullable=False)
tts_id = Column(String(45), nullable=False)
image_url = Column(String(500), nullable=False)
description = Column(Text, nullable=False)

chats = relationship("Chat", back_populates="character")
1 change: 1 addition & 0 deletions app/schemas/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class CharacterDetail(BaseModel):
id: int
name: str
image_url: str
description: str

class Config:
from_attributes = True
Expand Down
4 changes: 2 additions & 2 deletions app/services/character_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_character_by_name(db: Session, character_name: str):

def get_characters(db: Session, skip: int = 0, limit: int = 100):
characters = db.query(Character).filter(Character.is_deleted == False).offset(skip).limit(limit).all()
character_list = [CharacterDetail(id=character.id, name=character.name, image_url=character.image_url) for character
character_list = [CharacterDetail(id=character.id, name=character.name, image_url=character.image_url, description=character.description) for character
in characters]
return character_list

Expand Down Expand Up @@ -112,7 +112,7 @@ def get_dashboard_character(db: Session, character_name: str):
id=character.id,
name=character.name,
image=character.image_url,
description="설명"
description=character.description
),
top_images=[
ImageInfo(
Expand Down

0 comments on commit 5ce0c82

Please sign in to comment.