"""Add operations workload engine

Revision ID: 8f2c1a7b9d31
Revises: 4c1cbc29bd16
"""

from alembic import op
import sqlalchemy as sa
from sqlalchemy import inspect

revision = "8f2c1a7b9d31"
down_revision = "4c1cbc29bd16"
branch_labels = None
depends_on = None

def _table_exists(name):
    return name in inspect(op.get_bind()).get_table_names()

def upgrade():
    if not _table_exists("operations_workload_standard"):
        op.create_table(
            "operations_workload_standard",
            sa.Column("id", sa.Integer(), primary_key=True),
            sa.Column("application_name", sa.String(150), nullable=False),
            sa.Column("file_extension", sa.String(150), nullable=True),
            sa.Column("sow", sa.String(200), nullable=False),
            sa.Column("service_name", sa.String(150), nullable=False),
            sa.Column("complexity", sa.String(30), nullable=False),
            sa.Column("standard_minutes", sa.Numeric(12,4), nullable=False),
            sa.Column("unit_type", sa.String(50), nullable=False, server_default="Quantity"),
            sa.Column("base_quantity", sa.Numeric(12,4), nullable=False, server_default="1"),
            sa.Column("remarks", sa.Text(), nullable=True),
            sa.Column("is_active", sa.Boolean(), nullable=False, server_default=sa.text("1")),
            sa.Column("effective_from", sa.Date(), nullable=True),
            sa.Column("effective_to", sa.Date(), nullable=True),
            sa.Column("created_by_id", sa.Integer(), nullable=True),
            sa.Column("updated_by_id", sa.Integer(), nullable=True),
            sa.Column("created_at", sa.DateTime(), nullable=False, server_default=sa.func.now()),
            sa.Column("updated_at", sa.DateTime(), nullable=False, server_default=sa.func.now()),
            sa.ForeignKeyConstraint(["created_by_id"],["users.id"]),
            sa.ForeignKeyConstraint(["updated_by_id"],["users.id"]),
            sa.UniqueConstraint("application_name","file_extension","sow","service_name","complexity",name="uq_operations_workload_standard_combination"),
        )
        for col in ["application_name","file_extension","sow","service_name","complexity","is_active"]:
            op.create_index(f"ix_operations_workload_standard_{col}","operations_workload_standard",[col],unique=False)

    if not _table_exists("operations_jobcard_workload_entry"):
        op.create_table(
            "operations_jobcard_workload_entry",
            sa.Column("id", sa.Integer(), primary_key=True),
            sa.Column("assignment_id", sa.Integer(), nullable=False),
            sa.Column("jobcard_service_id", sa.Integer(), nullable=False),
            sa.Column("workload_standard_id", sa.Integer(), nullable=False),
            sa.Column("application_snapshot", sa.String(150), nullable=False),
            sa.Column("file_extension_snapshot", sa.String(150), nullable=True),
            sa.Column("sow_snapshot", sa.String(200), nullable=False),
            sa.Column("service_snapshot", sa.String(150), nullable=False),
            sa.Column("complexity_snapshot", sa.String(30), nullable=False),
            sa.Column("unit_type_snapshot", sa.String(50), nullable=False),
            sa.Column("base_quantity_snapshot", sa.Numeric(12,4), nullable=False),
            sa.Column("standard_minutes_snapshot", sa.Numeric(12,4), nullable=False),
            sa.Column("quantity", sa.Numeric(14,4), nullable=False),
            sa.Column("calculated_minutes", sa.Numeric(16,4), nullable=False),
            sa.Column("source", sa.String(30), nullable=False, server_default="LIVE_ENTRY"),
            sa.Column("is_active", sa.Boolean(), nullable=False, server_default=sa.text("1")),
            sa.Column("created_by_id", sa.Integer(), nullable=False),
            sa.Column("updated_by_id", sa.Integer(), nullable=True),
            sa.Column("created_at", sa.DateTime(), nullable=False, server_default=sa.func.now()),
            sa.Column("updated_at", sa.DateTime(), nullable=False, server_default=sa.func.now()),
            sa.ForeignKeyConstraint(["assignment_id"],["operations_jobcard_assignment.id"]),
            sa.ForeignKeyConstraint(["jobcard_service_id"],["operations_jobcard_service.id"]),
            sa.ForeignKeyConstraint(["workload_standard_id"],["operations_workload_standard.id"]),
            sa.ForeignKeyConstraint(["created_by_id"],["users.id"]),
            sa.ForeignKeyConstraint(["updated_by_id"],["users.id"]),
        )
        for col in ["assignment_id","jobcard_service_id","workload_standard_id","is_active"]:
            op.create_index(f"ix_operations_jobcard_workload_entry_{col}","operations_jobcard_workload_entry",[col],unique=False)

    bind = op.get_bind()
    count = bind.execute(sa.text("SELECT COUNT(*) FROM operations_workload_standard")).scalar()
    if not count:
        table = sa.table("operations_workload_standard",
            sa.column("application_name",sa.String), sa.column("file_extension",sa.String), sa.column("sow",sa.String),
            sa.column("service_name",sa.String), sa.column("complexity",sa.String), sa.column("standard_minutes",sa.Numeric),
            sa.column("unit_type",sa.String), sa.column("base_quantity",sa.Numeric), sa.column("remarks",sa.Text), sa.column("is_active",sa.Boolean))
        op.bulk_insert(table, SEED_ROWS)

def downgrade():
    if _table_exists("operations_jobcard_workload_entry"):
        op.drop_table("operations_jobcard_workload_entry")
    if _table_exists("operations_workload_standard"):
        op.drop_table("operations_workload_standard")

SEED_ROWS = [{'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Simple',
  'standard_minutes': 6.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Complex',
  'standard_minutes': 19.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Form',
  'standard_minutes': 30.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Simple',
  'standard_minutes': 4.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Complex',
  'standard_minutes': 12.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Form',
  'standard_minutes': 16.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Recreation (RTL)',
  'service_name': 'File Creation',
  'complexity': 'Simple',
  'standard_minutes': 10.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Recreation (RTL)',
  'service_name': 'File Creation',
  'complexity': 'Complex',
  'standard_minutes': 30.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Recreation (RTL)',
  'service_name': 'File Creation',
  'complexity': 'Form',
  'standard_minutes': 40.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Simple',
  'standard_minutes': 10.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Complex',
  'standard_minutes': 20.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Word',
  'file_extension': '.DOCX/.DOC',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Form',
  'standard_minutes': 30.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Excel',
  'file_extension': '.XLSX/.XLS',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Simple',
  'standard_minutes': 4.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Complex & Tabular: Considering 1000 Words (Numbers & Text)',
  'is_active': True},
 {'application_name': 'Excel',
  'file_extension': '.XLSX/.XLS',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Complex',
  'standard_minutes': 12.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Complex & Tabular: Considering 1000 Words (Numbers & Text)',
  'is_active': True},
 {'application_name': 'Excel',
  'file_extension': '.XLSX/.XLS',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Form',
  'standard_minutes': 16.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Complex & Tabular: Considering 1000 Words (Numbers & Text)',
  'is_active': True},
 {'application_name': 'Excel',
  'file_extension': '.XLSX/.XLS',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Simple',
  'standard_minutes': 10.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Complex & Tabular: Considering 1000 Words (Numbers & Text)',
  'is_active': True},
 {'application_name': 'Excel',
  'file_extension': '.XLSX/.XLS',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Complex',
  'standard_minutes': 30.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Complex & Tabular: Considering 1000 Words (Numbers & Text)',
  'is_active': True},
 {'application_name': 'Excel',
  'file_extension': '.XLSX/.XLS',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Form',
  'standard_minutes': 40.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Complex & Tabular: Considering 1000 Words (Numbers & Text)',
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Simple',
  'standard_minutes': 3.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Complex',
  'standard_minutes': 11.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Form',
  'standard_minutes': 19.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Simple',
  'standard_minutes': 2.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Complex',
  'standard_minutes': 5.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Form',
  'standard_minutes': 10.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Simple',
  'standard_minutes': 4.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Complex',
  'standard_minutes': 10.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'PowerPoint',
  'file_extension': '.PPTX/.PPT',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Form',
  'standard_minutes': 20.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Publisher',
  'file_extension': '.PUB',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Simple',
  'standard_minutes': 4.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Publisher',
  'file_extension': '.PUB',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Complex',
  'standard_minutes': 12.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Publisher',
  'file_extension': '.PUB',
  'sow': 'Formatting (LTR)',
  'service_name': 'File Formatting',
  'complexity': 'Form',
  'standard_minutes': 16.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Publisher',
  'file_extension': '.PUB',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Simple',
  'standard_minutes': 10.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Publisher',
  'file_extension': '.PUB',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Complex',
  'standard_minutes': 20.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Publisher',
  'file_extension': '.PUB',
  'sow': 'Formatting (RTL)',
  'service_name': 'File Formatting',
  'complexity': 'Form',
  'standard_minutes': 30.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Simple',
  'standard_minutes': 6.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Complex',
  'standard_minutes': 12.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Form',
  'standard_minutes': 32.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 3.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 8.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 24.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 6.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 15.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'InDesign',
  'file_extension': '.INDD',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 35.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Simple',
  'standard_minutes': 8.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Complex',
  'standard_minutes': 16.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Form',
  'standard_minutes': 24.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 5.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 12.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 40.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 8.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 20.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Illustrator',
  'file_extension': '.AI',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 60.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 6.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 16.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 25.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 11.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 25.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 40.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'Image Localization  (LTR)',
  'service_name': 'Image Localization',
  'complexity': 'Simple',
  'standard_minutes': 6.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'Image Localization  (LTR)',
  'service_name': 'Image Localization',
  'complexity': 'Complex',
  'standard_minutes': 16.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'Image Localization  (LTR)',
  'service_name': 'Image Localization',
  'complexity': 'Form',
  'standard_minutes': 32.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'Image Localization  (RTL)',
  'service_name': 'Image Localization',
  'complexity': 'Simple',
  'standard_minutes': 11.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'Image Localization  (RTL)',
  'service_name': 'Image Localization',
  'complexity': 'Complex',
  'standard_minutes': 25.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Photoshop',
  'file_extension': '.PSD',
  'sow': 'Image Localization  (RTL)',
  'service_name': 'Image Localization',
  'complexity': 'Form',
  'standard_minutes': 50.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Simple',
  'standard_minutes': 11.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Complex',
  'standard_minutes': 20.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'Recreation (LTR)',
  'service_name': 'File Creation',
  'complexity': 'Form',
  'standard_minutes': 30.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 7.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 10.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 20.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 13.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 20.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'CorelDraw',
  'file_extension': '.CDR',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 35.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'FrameMaker',
  'file_extension': '.FM',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 9.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'FrameMaker',
  'file_extension': '.FM',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 15.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'FrameMaker',
  'file_extension': '.FM',
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 25.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'FrameMaker',
  'file_extension': '.FM',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 18.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'FrameMaker',
  'file_extension': '.FM',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 30.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'FrameMaker',
  'file_extension': '.FM',
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 40.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Pre-Processing',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 22.0,
  'unit_type': 'Pages',
  'base_quantity': 1.0,
  'remarks': 'Considering InDesign, Word, PPT, Excel &  PDF with 10 pages, including multiple pages, multiple images [Check the broken line & paragraph], '
             'creation of bilingual file of non-editable images. For the AI, CDR & PSD [need to be extract content in the bilingual format] etc.',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Pre-Processing',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 35.0,
  'unit_type': 'Pages',
  'base_quantity': 1.0,
  'remarks': 'Considering InDesign, Word, PPT, Excel &  PDF with 10 pages, including multiple pages, multiple images [Check the broken line & paragraph], '
             'creation of bilingual file of non-editable images. For the AI, CDR & PSD [need to be extract content in the bilingual format] etc.',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Pre-Processing',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 45.0,
  'unit_type': 'Pages',
  'base_quantity': 1.0,
  'remarks': 'Considering InDesign, Word, PPT, Excel &  PDF with 10 pages, including multiple pages, multiple images [Check the broken line & paragraph], '
             'creation of bilingual file of non-editable images. For the AI, CDR & PSD [need to be extract content in the bilingual format] etc.',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Creation',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 13.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Creation',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 40.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Creation',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 60.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Alignment',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 23.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Alignment',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 60.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Alignment',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 120.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Management',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 8.0,
  'unit_type': 'Segments',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 segments in a PTMs',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Management',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 30.0,
  'unit_type': 'Segments',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 segments in a PTMs',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'TM Management',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 60.0,
  'unit_type': 'Segments',
  'base_quantity': 1000.0,
  'remarks': 'Simple: Considering 1000 segments in a PTMs',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 35.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Simple: Considering 3000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 60.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Simple: Considering 3000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 80.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Simple: Considering 3000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 70.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 100.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'AutoCAD',
  'file_extension': '.DWG',
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 120.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Word Count Report',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 2.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Word Count Report',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 3.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Word Count Report',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 5.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Pre-Processing',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 8.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Considering Passolo Bendals with ≥1000 words [Check the broken text & needs to be extract the content in excel to process the translation via '
             'SDL Live/Studio]',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Pre-Processing',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 20.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Considering Passolo Bendals with ≥1000 words [Check the broken text & needs to be extract the content in excel to process the translation via '
             'SDL Live/Studio]',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Pre-Processing',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 50.0,
  'unit_type': 'Words',
  'base_quantity': 1000.0,
  'remarks': 'Considering Passolo Bendals with ≥1000 words [Check the broken text & needs to be extract the content in excel to process the translation via '
             'SDL Live/Studio]',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 80.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 120.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 150.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 100.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 150.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Passolo',
  'file_extension': '.TBULIC',
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 180.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Online CAT Tool',
  'file_extension': None,
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 35.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Online CAT Tool',
  'file_extension': None,
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 60.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Online CAT Tool',
  'file_extension': None,
  'sow': 'Technichal QA',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 80.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Online CAT Tool',
  'file_extension': None,
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Simple',
  'standard_minutes': 55.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Online CAT Tool',
  'file_extension': None,
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Complex',
  'standard_minutes': 80.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Online CAT Tool',
  'file_extension': None,
  'sow': 'Linguistic QA',
  'service_name': 'Translation',
  'complexity': 'Form',
  'standard_minutes': 100.0,
  'unit_type': 'Words',
  'base_quantity': 3000.0,
  'remarks': 'Considering 3000 WC',
  'is_active': True},
 {'application_name': 'Canva (Online Tools)',
  'file_extension': None,
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 18.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Canva (Online Tools)',
  'file_extension': None,
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 40.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Canva (Online Tools)',
  'file_extension': None,
  'sow': 'DTP (LTR)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 50.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Canva (Online Tools)',
  'file_extension': None,
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Simple',
  'standard_minutes': 25.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Canva (Online Tools)',
  'file_extension': None,
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Complex',
  'standard_minutes': 50.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True},
 {'application_name': 'Canva (Online Tools)',
  'file_extension': None,
  'sow': 'DTP (RTL)',
  'service_name': 'DTP',
  'complexity': 'Form',
  'standard_minutes': 60.0,
  'unit_type': 'Quantity',
  'base_quantity': 1.0,
  'remarks': None,
  'is_active': True}]
