{
 "actions": [],
 "allow_rename": 0,
 "autoname": "format:{owner}-{container_name}",
 "creation": "2025-01-22 12:00:00.000000",
 "doctype": "DocType",
 "engine": "InnoDB",
 "field_order": [
  "container_name",
  "image",
  "container_type",
  "column_break_config",
  "incus_server",
  "section_break_status",
  "status",
  "incus_status",
  "column_break_status",
  "ip_address",
  "architecture",
  "section_break_details",
  "created_at",
  "last_used_at",
  "column_break_details",
  "error_message",
  "section_break_subscription",
  "max_users",
  "trial",
  "column_break_subscription",
  "subscription",
  "remote_subscription"
 ],
 "fields": [
  {
   "fieldname": "container_name",
   "fieldtype": "Data",
   "label": "Container Name",
   "reqd": 1,
   "unique": 1,
   "description": "Unique container name in Incus"
  },
  {
   "fieldname": "image",
   "fieldtype": "Data",
   "label": "Image",
   "reqd": 1,
   "default": "alpine/edge",
   "description": "Incus image alias (e.g., alpine/edge, ubuntu/22.04)"
  },
  {
   "fieldname": "container_type",
   "fieldtype": "Select",
   "label": "Type",
   "options": "container\nvirtual-machine",
   "default": "container",
   "description": "Instance type: container or virtual machine"
  },
  {
   "fieldname": "column_break_config",
   "fieldtype": "Column Break"
  },
  {
   "fieldname": "incus_server",
   "fieldtype": "Data",
   "label": "Incus Server",
   "default": "default",
   "read_only": 1,
   "description": "Incus server identifier"
  },
  {
   "fieldname": "section_break_status",
   "fieldtype": "Section Break",
   "label": "Status"
  },
  {
   "fieldname": "status",
   "fieldtype": "Select",
   "label": "Status",
   "options": "Pending\nCreating\nRunning\nStopped\nError",
   "default": "Pending",
   "read_only": 1,
   "in_list_view": 1,
   "description": "Current container status"
  },
  {
   "fieldname": "incus_status",
   "fieldtype": "Data",
   "label": "Incus Status",
   "read_only": 1,
   "description": "Raw status from Incus API"
  },
  {
   "fieldname": "column_break_status",
   "fieldtype": "Column Break"
  },
  {
   "fieldname": "ip_address",
   "fieldtype": "Data",
   "label": "IP Address",
   "read_only": 1,
   "in_list_view": 1,
   "description": "Container IP address"
  },
  {
   "fieldname": "architecture",
   "fieldtype": "Data",
   "label": "Architecture",
   "read_only": 1,
   "description": "Container architecture (x86_64, aarch64, etc.)"
  },
  {
   "fieldname": "section_break_details",
   "fieldtype": "Section Break",
   "label": "Details"
  },
  {
   "fieldname": "created_at",
   "fieldtype": "Datetime",
   "label": "Created At",
   "read_only": 1,
   "description": "Container creation time in Incus"
  },
  {
   "fieldname": "last_used_at",
   "fieldtype": "Datetime",
   "label": "Last Used At",
   "read_only": 1,
   "description": "Last usage time"
  },
  {
   "fieldname": "column_break_details",
   "fieldtype": "Column Break"
  },
  {
   "fieldname": "error_message",
   "fieldtype": "Small Text",
   "label": "Error Message",
   "read_only": 1,
   "description": "Error details if creation failed"
  },
  {
   "fieldname": "section_break_subscription",
   "fieldtype": "Section Break",
   "label": "Subscription"
  },
  {
   "fieldname": "max_users",
   "fieldtype": "Int",
   "label": "Max Users",
   "default": "1",
   "description": "Number of licensed users for this container"
  },
  {
   "fieldname": "trial",
   "fieldtype": "Check",
   "label": "Trial Mode",
   "default": "0",
   "description": "Trial / demo mode — fixed 1 user, 14-day period"
  },
  {
   "fieldname": "column_break_subscription",
   "fieldtype": "Column Break"
  },
  {
   "fieldname": "subscription",
   "fieldtype": "Link",
   "label": "Subscription",
   "options": "Subscription",
   "read_only": 1,
   "description": "Linked ERPNext Subscription"
  },
  {
   "fieldname": "remote_subscription",
   "fieldtype": "Data",
   "label": "Remote Subscription",
   "read_only": 1,
   "description": "Subscription ID in remote ERPNext (synced)"
  }
 ],
 "index_web_pages_for_search": 1,
 "links": [],
 "modified": "2025-01-22 12:00:00.000000",
 "modified_by": "Administrator",
 "module": "Cloud Portal",
 "name": "Cloud Container",
 "naming_rule": "Expression",
 "owner": "Administrator",
 "permissions": [
  {
   "create": 1,
   "delete": 1,
   "email": 1,
   "export": 1,
   "print": 1,
   "read": 1,
   "report": 1,
   "role": "System Manager",
   "share": 1,
   "write": 1
  },
  {
   "create": 1,
   "delete": 1,
   "email": 1,
   "export": 1,
   "if_owner": 1,
   "print": 1,
   "read": 1,
   "report": 1,
   "role": "Website User",
   "write": 1
  }
 ],
 "sort_field": "creation",
 "sort_order": "DESC",
 "states": [],
 "track_changes": 1
}
