Major enhancements: - Feature flag system for cloud vs air-gapped deployment modes - Automatic storage backend selection based on deployment mode - Comprehensive seed data generation utilities - Support for generating CSV, JSON, binary, and PCAP test files - Quick seed script for easy data generation - Angular 19 frontend complete setup documentation - Material Design UI component examples and configuration Fixes: - Resolve SQLAlchemy metadata column name conflict - Rename metadata to custom_metadata throughout codebase - Fix API health check issues Documentation: - FEATURES.md - Complete feature overview - FRONTEND_SETUP.md - Angular 19 setup guide with examples - SUMMARY.md - Implementation summary 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
1.4 KiB
Python
39 lines
1.4 KiB
Python
from sqlalchemy import Column, String, Integer, DateTime, JSON, BigInteger, Text
|
|
from sqlalchemy.ext.declarative import declarative_base
|
|
from datetime import datetime
|
|
|
|
Base = declarative_base()
|
|
|
|
|
|
class Artifact(Base):
|
|
__tablename__ = "artifacts"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
filename = Column(String(500), nullable=False, index=True)
|
|
file_type = Column(String(50), nullable=False, index=True) # csv, json, binary, pcap
|
|
file_size = Column(BigInteger, nullable=False)
|
|
storage_path = Column(String(1000), nullable=False)
|
|
content_type = Column(String(100))
|
|
|
|
# Test metadata
|
|
test_name = Column(String(500), index=True)
|
|
test_suite = Column(String(500), index=True)
|
|
test_config = Column(JSON)
|
|
test_result = Column(String(50), index=True) # pass, fail, skip, error
|
|
|
|
# Additional metadata
|
|
custom_metadata = Column(JSON)
|
|
description = Column(Text)
|
|
tags = Column(JSON) # Array of tags for categorization
|
|
|
|
# Timestamps
|
|
created_at = Column(DateTime, default=datetime.utcnow, index=True)
|
|
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
|
|
|
# Versioning
|
|
version = Column(String(50))
|
|
parent_id = Column(Integer, index=True) # For file versioning
|
|
|
|
def __repr__(self):
|
|
return f"<Artifact(id={self.id}, filename='{self.filename}', test_name='{self.test_name}')>"
|