{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pestprocrm-com/json-schema/pestprocrm-com-product-log-schema.json",
  "title": "ProductLog",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pestprocrm-com-openapi.yml#/components/schemas/ProductLog",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique product log ID"
    },
    "serviceRecordId": {
      "type": "string",
      "description": "Associated service record ID"
    },
    "productName": {
      "type": "string",
      "description": "Name of product used"
    },
    "manufacturer": {
      "type": "string",
      "description": "Product manufacturer"
    },
    "EPA_registration_number": {
      "type": "string",
      "description": "EPA registration number for compliance"
    },
    "activeIngredient": {
      "type": "string",
      "description": "Active ingredient(s)"
    },
    "concentration": {
      "type": "string",
      "description": "Concentration of active ingredient"
    },
    "amountUsed": {
      "type": "number",
      "description": "Amount of product used"
    },
    "unit": {
      "type": "string",
      "description": "Unit of measurement (oz, ml, gal, etc.)"
    },
    "applicationMethod": {
      "type": "string",
      "description": "Method of application"
    },
    "targetPest": {
      "type": "string",
      "description": "Target pest for treatment"
    },
    "applicatorId": {
      "type": "string",
      "description": "Technician/applicator ID"
    },
    "applicatorName": {
      "type": "string",
      "description": "Technician name"
    },
    "licenseNumber": {
      "type": "string",
      "description": "Applicator license number"
    },
    "date": {
      "type": "string",
      "format": "date-time",
      "description": "Date of application"
    },
    "propertyAddress": {
      "type": "string",
      "description": "Address where product was applied"
    },
    "propertyId": {
      "type": "string",
      "description": "Property ID"
    },
    "customerId": {
      "type": "string",
      "description": "Customer ID"
    },
    "weatherConditions": {
      "$ref": "#/$defs/WeatherConditions"
    },
    "notes": {
      "type": "string",
      "description": "Additional notes"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Created timestamp"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Updated timestamp"
    }
  },
  "required": [
    "id",
    "productName",
    "EPA_registration_number",
    "amountUsed",
    "unit",
    "applicationMethod",
    "propertyAddress"
  ],
  "$defs": {
    "WeatherConditions": {
      "type": "object",
      "properties": {
        "temp": {
          "type": "number",
          "description": "Temperature in Fahrenheit"
        },
        "humidity": {
          "type": "number",
          "description": "Humidity percentage"
        },
        "wind": {
          "type": "string",
          "description": "Wind conditions"
        }
      }
    }
  }
}