19 lines
718 B
Python
19 lines
718 B
Python
"""用户功能使用记录表"""
|
|
|
|
from datetime import datetime
|
|
|
|
from sqlalchemy import BigInteger, String, DateTime
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.core.database import Base
|
|
|
|
|
|
class UserFuncUsageLog(Base):
|
|
"""用户功能使用记录表 bg_user_func_usage_log"""
|
|
__tablename__ = "bg_user_func_usage_log"
|
|
|
|
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
|
|
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
|
|
func_code: Mapped[str] = mapped_column(String(12), nullable=False, comment="功能编码")
|
|
create_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment="使用时间")
|