xiaozhi-esp32-server/main/feedback-backend/app/domain/store/entity.py
kobe fae932d022 feat: add CRM feedback system and test environment
- add feedback backend, H5/admin UI, CRM services, and deployment docs
- add isolated local test compose on port 18007 with separate data paths
- remove committed LLM secret and support provider-specific env overrides

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-28 16:46:32 +08:00

38 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""门店领域实体"""
from dataclasses import dataclass, field
from datetime import datetime
from typing import Optional
@dataclass
class Store:
"""门店实体 - DDD 领域模型,纯 Python,不依赖任何框架"""
id: str
store_code: str # 6位门店编码,客户扫码用
store_name: str
manager: Optional[str] = None
shareholders: Optional[str] = None # 逗号分隔
agent_id: Optional[str] = None # 绑定的智能体 ID
status: int = 1 # 0=禁用 1=启用
create_date: Optional[datetime] = None
update_date: Optional[datetime] = None
def is_enabled(self) -> bool:
return self.status == 1
def disable(self):
self.status = 0
self.update_date = datetime.now()
def enable(self):
self.status = 1
self.update_date = datetime.now()
def bind_agent(self, agent_id: str):
self.agent_id = agent_id
self.update_date = datetime.now()
def unbind_agent(self):
self.agent_id = None
self.update_date = datetime.now()