Bring the full EditmaskwithAI application into the repo under paintplus/ (429 files) so the service is self-contained — the installer copies the vendored source to ~/docker/paintplus/src instead of cloning at runtime. Rename to PaintPlus (service + branding; app logic untouched): - services/editmaskwithai.sh -> services/paintplus.sh (register_service paintplus, install_paintplus, ~/docker/paintplus, Caddy paintplus:8000, Authelia option preserved) - container names -> paintplus across docker-compose*.yml; dev network -> paintplus-network - browser <title> -> "PaintPlus - AI Image Editor"; README heading -> PaintPlus with upstream provenance note - README utilities table: editmaskwithai -> paintplus Backend/frontend code (help strings referencing the old container name, the ai_photo_edit.db filename) is intentionally left as-is to avoid touching application logic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nb2vJ8W7bHKx1JXVvpCraH
38 lines
1.4 KiB
Python
38 lines
1.4 KiB
Python
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey, Text, Boolean
|
|
from sqlalchemy.orm import relationship
|
|
from datetime import datetime
|
|
from app.database import Base
|
|
|
|
|
|
class Patch(Base):
|
|
__tablename__ = "patches"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
user_id = Column(Integer, ForeignKey("users.id"), nullable=True)
|
|
name = Column(String, nullable=False)
|
|
description = Column(Text, nullable=True)
|
|
created_at = Column(DateTime, default=datetime.utcnow)
|
|
|
|
# Source information
|
|
source_type = Column(String, nullable=False) # "ai_generated", "manual_selection", "imported"
|
|
source_project_id = Column(Integer, ForeignKey("projects.id"), nullable=True)
|
|
source_edit_id = Column(Integer, ForeignKey("edits.id"), nullable=True)
|
|
|
|
# Patch metadata
|
|
width = Column(Integer, nullable=False)
|
|
height = Column(Integer, nullable=False)
|
|
tags = Column(Text, nullable=True) # Comma-separated tags
|
|
category = Column(String, nullable=True) # "hand", "face", "body", "object", "texture", etc.
|
|
|
|
# Is this patch shared/public?
|
|
is_public = Column(Boolean, default=False)
|
|
|
|
# File path (relative to data dir)
|
|
file_path = Column(String, nullable=False)
|
|
thumbnail_path = Column(String, nullable=True)
|
|
|
|
# Relationships
|
|
user = relationship("User", back_populates="patches")
|
|
source_project = relationship("Project")
|
|
source_edit = relationship("Edit")
|