enrich workspace table information
This commit is contained in:
@@ -6,11 +6,18 @@ class Workspace(Base, AutoID):
|
|||||||
"""工作区表"""
|
"""工作区表"""
|
||||||
__tablename__ = "workspaces"
|
__tablename__ = "workspaces"
|
||||||
|
|
||||||
|
# --- 基础与个性化 ---
|
||||||
name = Column(String, nullable=False)
|
name = Column(String, nullable=False)
|
||||||
|
slug = Column(String, unique=True, index=True, nullable=False)
|
||||||
|
logo = Column(String, nullable=True)
|
||||||
|
description = Column(String, nullable=True)
|
||||||
|
|
||||||
# 存储容量上限(单位:字节 Bytes),默认 5GB
|
# 存储容量上限(单位:字节 Bytes),默认 5GB
|
||||||
storage_limit = Column(BigInteger, default=5 * 1024 * 1024 * 1024)
|
storage_limit = Column(BigInteger, default=5 * 1024 * 1024 * 1024)
|
||||||
|
storage_used = Column(BigInteger, default=0, nullable=False)
|
||||||
|
|
||||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||||
|
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
|
||||||
|
|
||||||
|
|
||||||
class WorkspaceMember(Base, AutoID):
|
class WorkspaceMember(Base, AutoID):
|
||||||
|
|||||||
Reference in New Issue
Block a user