Initial YakPanel commit
This commit is contained in:
16
YakPanel-server/backend/app/models/plugin.py
Normal file
16
YakPanel-server/backend/app/models/plugin.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""YakPanel - Custom plugin model (third-party plugins added from URL)"""
|
||||
from sqlalchemy import String, Integer, Boolean
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class CustomPlugin(Base):
|
||||
__tablename__ = "custom_plugins"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
plugin_id: Mapped[str] = mapped_column(String(64), unique=True, nullable=False) # unique id from manifest
|
||||
name: Mapped[str] = mapped_column(String(128), nullable=False)
|
||||
version: Mapped[str] = mapped_column(String(32), default="1.0")
|
||||
desc: Mapped[str] = mapped_column(String(512), default="")
|
||||
source_url: Mapped[str] = mapped_column(String(512), default="") # URL it was installed from
|
||||
enabled: Mapped[bool] = mapped_column(Boolean, default=True)
|
||||
Reference in New Issue
Block a user