1680 lines
44 KiB
JSON
1680 lines
44 KiB
JSON
{
|
|
"id": "625f31c4-cd87-4d4d-ad2b-22cf47de4295",
|
|
"prevId": "7a1c94ab-46cd-48cb-b84f-622da7a036c1",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.account": {
|
|
"name": "account",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"account_id": {
|
|
"name": "account_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider_id": {
|
|
"name": "provider_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"access_token": {
|
|
"name": "access_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"refresh_token": {
|
|
"name": "refresh_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"id_token": {
|
|
"name": "id_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"access_token_expires_at": {
|
|
"name": "access_token_expires_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"refresh_token_expires_at": {
|
|
"name": "refresh_token_expires_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"account_user_id_user_id_fk": {
|
|
"name": "account_user_id_user_id_fk",
|
|
"tableFrom": "account",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.jwks": {
|
|
"name": "jwks",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"public_key": {
|
|
"name": "public_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"private_key": {
|
|
"name": "private_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.session": {
|
|
"name": "session",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"ip_address": {
|
|
"name": "ip_address",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"user_agent": {
|
|
"name": "user_agent",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"impersonated_by": {
|
|
"name": "impersonated_by",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"session_user_id_user_id_fk": {
|
|
"name": "session_user_id_user_id_fk",
|
|
"tableFrom": "session",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"session_token_unique": {
|
|
"name": "session_token_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user": {
|
|
"name": "user",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email_verified": {
|
|
"name": "email_verified",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"image": {
|
|
"name": "image",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"banned": {
|
|
"name": "banned",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"ban_reason": {
|
|
"name": "ban_reason",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"ban_expires": {
|
|
"name": "ban_expires",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"display_username": {
|
|
"name": "display_username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"user_email_unique": {
|
|
"name": "user_email_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"email"
|
|
]
|
|
},
|
|
"user_username_unique": {
|
|
"name": "user_username_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"username"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.verification": {
|
|
"name": "verification",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"identifier": {
|
|
"name": "identifier",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.charge_point": {
|
|
"name": "charge_point",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"charge_point_identifier": {
|
|
"name": "charge_point_identifier",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"charge_point_serial_number": {
|
|
"name": "charge_point_serial_number",
|
|
"type": "varchar(25)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"charge_point_model": {
|
|
"name": "charge_point_model",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"charge_point_vendor": {
|
|
"name": "charge_point_vendor",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"firmware_version": {
|
|
"name": "firmware_version",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"iccid": {
|
|
"name": "iccid",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"imsi": {
|
|
"name": "imsi",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"meter_serial_number": {
|
|
"name": "meter_serial_number",
|
|
"type": "varchar(25)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"meter_type": {
|
|
"name": "meter_type",
|
|
"type": "varchar(25)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"registration_status": {
|
|
"name": "registration_status",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'Pending'"
|
|
},
|
|
"heartbeat_interval": {
|
|
"name": "heartbeat_interval",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": 60
|
|
},
|
|
"last_heartbeat_at": {
|
|
"name": "last_heartbeat_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_boot_notification_at": {
|
|
"name": "last_boot_notification_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"fee_per_kwh": {
|
|
"name": "fee_per_kwh",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"charge_point_charge_point_identifier_unique": {
|
|
"name": "charge_point_charge_point_identifier_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"charge_point_identifier"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.charging_profile": {
|
|
"name": "charging_profile",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"charge_point_id": {
|
|
"name": "charge_point_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"connector_id": {
|
|
"name": "connector_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"connector_number": {
|
|
"name": "connector_number",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"transaction_id": {
|
|
"name": "transaction_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"stack_level": {
|
|
"name": "stack_level",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"charging_profile_purpose": {
|
|
"name": "charging_profile_purpose",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"charging_profile_kind": {
|
|
"name": "charging_profile_kind",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"recurrency_kind": {
|
|
"name": "recurrency_kind",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"valid_from": {
|
|
"name": "valid_from",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"valid_to": {
|
|
"name": "valid_to",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"charging_schedule": {
|
|
"name": "charging_schedule",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_charging_profile_charge_point_id": {
|
|
"name": "idx_charging_profile_charge_point_id",
|
|
"columns": [
|
|
{
|
|
"expression": "charge_point_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_charging_profile_connector_id": {
|
|
"name": "idx_charging_profile_connector_id",
|
|
"columns": [
|
|
{
|
|
"expression": "connector_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_charging_profile_purpose_stack": {
|
|
"name": "idx_charging_profile_purpose_stack",
|
|
"columns": [
|
|
{
|
|
"expression": "connector_number",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "charging_profile_purpose",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "stack_level",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"charging_profile_charge_point_id_charge_point_id_fk": {
|
|
"name": "charging_profile_charge_point_id_charge_point_id_fk",
|
|
"tableFrom": "charging_profile",
|
|
"tableTo": "charge_point",
|
|
"columnsFrom": [
|
|
"charge_point_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"charging_profile_connector_id_connector_id_fk": {
|
|
"name": "charging_profile_connector_id_connector_id_fk",
|
|
"tableFrom": "charging_profile",
|
|
"tableTo": "connector",
|
|
"columnsFrom": [
|
|
"connector_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"charging_profile_transaction_id_transaction_id_fk": {
|
|
"name": "charging_profile_transaction_id_transaction_id_fk",
|
|
"tableFrom": "charging_profile",
|
|
"tableTo": "transaction",
|
|
"columnsFrom": [
|
|
"transaction_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.connector": {
|
|
"name": "connector",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"charge_point_id": {
|
|
"name": "charge_point_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"connector_id": {
|
|
"name": "connector_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'Unavailable'"
|
|
},
|
|
"error_code": {
|
|
"name": "error_code",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'NoError'"
|
|
},
|
|
"info": {
|
|
"name": "info",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vendor_id": {
|
|
"name": "vendor_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vendor_error_code": {
|
|
"name": "vendor_error_code",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_status_at": {
|
|
"name": "last_status_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_connector_charge_point_id": {
|
|
"name": "idx_connector_charge_point_id",
|
|
"columns": [
|
|
{
|
|
"expression": "charge_point_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_connector_charge_point_connector": {
|
|
"name": "idx_connector_charge_point_connector",
|
|
"columns": [
|
|
{
|
|
"expression": "charge_point_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "connector_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"connector_charge_point_id_charge_point_id_fk": {
|
|
"name": "connector_charge_point_id_charge_point_id_fk",
|
|
"tableFrom": "connector",
|
|
"tableTo": "charge_point",
|
|
"columnsFrom": [
|
|
"charge_point_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.connector_status_history": {
|
|
"name": "connector_status_history",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"connector_id": {
|
|
"name": "connector_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"connector_number": {
|
|
"name": "connector_number",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"error_code": {
|
|
"name": "error_code",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"info": {
|
|
"name": "info",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vendor_id": {
|
|
"name": "vendor_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vendor_error_code": {
|
|
"name": "vendor_error_code",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status_timestamp": {
|
|
"name": "status_timestamp",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"received_at": {
|
|
"name": "received_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_status_history_connector_id": {
|
|
"name": "idx_status_history_connector_id",
|
|
"columns": [
|
|
{
|
|
"expression": "connector_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_status_history_timestamp": {
|
|
"name": "idx_status_history_timestamp",
|
|
"columns": [
|
|
{
|
|
"expression": "status_timestamp",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_status_history_received_at": {
|
|
"name": "idx_status_history_received_at",
|
|
"columns": [
|
|
{
|
|
"expression": "received_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"connector_status_history_connector_id_connector_id_fk": {
|
|
"name": "connector_status_history_connector_id_connector_id_fk",
|
|
"tableFrom": "connector_status_history",
|
|
"tableTo": "connector",
|
|
"columnsFrom": [
|
|
"connector_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.id_tag": {
|
|
"name": "id_tag",
|
|
"schema": "",
|
|
"columns": {
|
|
"id_tag": {
|
|
"name": "id_tag",
|
|
"type": "varchar(20)",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"parent_id_tag": {
|
|
"name": "parent_id_tag",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'Accepted'"
|
|
},
|
|
"expiry_date": {
|
|
"name": "expiry_date",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"balance": {
|
|
"name": "balance",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"id_tag_user_id_user_id_fk": {
|
|
"name": "id_tag_user_id_user_id_fk",
|
|
"tableFrom": "id_tag",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.local_auth_list": {
|
|
"name": "local_auth_list",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"charge_point_id": {
|
|
"name": "charge_point_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"list_version": {
|
|
"name": "list_version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"id_tag": {
|
|
"name": "id_tag",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"parent_id_tag": {
|
|
"name": "parent_id_tag",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"id_tag_status": {
|
|
"name": "id_tag_status",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expiry_date": {
|
|
"name": "expiry_date",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_local_auth_list_charge_point_id_tag": {
|
|
"name": "idx_local_auth_list_charge_point_id_tag",
|
|
"columns": [
|
|
{
|
|
"expression": "charge_point_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "id_tag",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"local_auth_list_charge_point_id_charge_point_id_fk": {
|
|
"name": "local_auth_list_charge_point_id_charge_point_id_fk",
|
|
"tableFrom": "local_auth_list",
|
|
"tableTo": "charge_point",
|
|
"columnsFrom": [
|
|
"charge_point_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.meter_value": {
|
|
"name": "meter_value",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"transaction_id": {
|
|
"name": "transaction_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"connector_id": {
|
|
"name": "connector_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"charge_point_id": {
|
|
"name": "charge_point_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"connector_number": {
|
|
"name": "connector_number",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"timestamp": {
|
|
"name": "timestamp",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"sampled_values": {
|
|
"name": "sampled_values",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"received_at": {
|
|
"name": "received_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_meter_value_transaction_id": {
|
|
"name": "idx_meter_value_transaction_id",
|
|
"columns": [
|
|
{
|
|
"expression": "transaction_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_meter_value_connector_id": {
|
|
"name": "idx_meter_value_connector_id",
|
|
"columns": [
|
|
{
|
|
"expression": "connector_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_meter_value_timestamp": {
|
|
"name": "idx_meter_value_timestamp",
|
|
"columns": [
|
|
{
|
|
"expression": "timestamp",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"meter_value_transaction_id_transaction_id_fk": {
|
|
"name": "meter_value_transaction_id_transaction_id_fk",
|
|
"tableFrom": "meter_value",
|
|
"tableTo": "transaction",
|
|
"columnsFrom": [
|
|
"transaction_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"meter_value_connector_id_connector_id_fk": {
|
|
"name": "meter_value_connector_id_connector_id_fk",
|
|
"tableFrom": "meter_value",
|
|
"tableTo": "connector",
|
|
"columnsFrom": [
|
|
"connector_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"meter_value_charge_point_id_charge_point_id_fk": {
|
|
"name": "meter_value_charge_point_id_charge_point_id_fk",
|
|
"tableFrom": "meter_value",
|
|
"tableTo": "charge_point",
|
|
"columnsFrom": [
|
|
"charge_point_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.reservation": {
|
|
"name": "reservation",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"charge_point_id": {
|
|
"name": "charge_point_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"connector_id": {
|
|
"name": "connector_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"connector_number": {
|
|
"name": "connector_number",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expiry_date": {
|
|
"name": "expiry_date",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"id_tag": {
|
|
"name": "id_tag",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"parent_id_tag": {
|
|
"name": "parent_id_tag",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'Active'"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_reservation_charge_point_id": {
|
|
"name": "idx_reservation_charge_point_id",
|
|
"columns": [
|
|
{
|
|
"expression": "charge_point_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_reservation_status": {
|
|
"name": "idx_reservation_status",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_reservation_expiry_date": {
|
|
"name": "idx_reservation_expiry_date",
|
|
"columns": [
|
|
{
|
|
"expression": "expiry_date",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"reservation_charge_point_id_charge_point_id_fk": {
|
|
"name": "reservation_charge_point_id_charge_point_id_fk",
|
|
"tableFrom": "reservation",
|
|
"tableTo": "charge_point",
|
|
"columnsFrom": [
|
|
"charge_point_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"reservation_connector_id_connector_id_fk": {
|
|
"name": "reservation_connector_id_connector_id_fk",
|
|
"tableFrom": "reservation",
|
|
"tableTo": "connector",
|
|
"columnsFrom": [
|
|
"connector_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.transaction": {
|
|
"name": "transaction",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"charge_point_id": {
|
|
"name": "charge_point_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"connector_id": {
|
|
"name": "connector_id",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"connector_number": {
|
|
"name": "connector_number",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"id_tag": {
|
|
"name": "id_tag",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"id_tag_status": {
|
|
"name": "id_tag_status",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"start_timestamp": {
|
|
"name": "start_timestamp",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"start_meter_value": {
|
|
"name": "start_meter_value",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"stop_id_tag": {
|
|
"name": "stop_id_tag",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"stop_timestamp": {
|
|
"name": "stop_timestamp",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"stop_meter_value": {
|
|
"name": "stop_meter_value",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"stop_reason": {
|
|
"name": "stop_reason",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"charge_amount": {
|
|
"name": "charge_amount",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"reservation_id": {
|
|
"name": "reservation_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_transaction_charge_point_id": {
|
|
"name": "idx_transaction_charge_point_id",
|
|
"columns": [
|
|
{
|
|
"expression": "charge_point_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_transaction_connector_id": {
|
|
"name": "idx_transaction_connector_id",
|
|
"columns": [
|
|
{
|
|
"expression": "connector_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_transaction_id_tag": {
|
|
"name": "idx_transaction_id_tag",
|
|
"columns": [
|
|
{
|
|
"expression": "id_tag",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_transaction_start_timestamp": {
|
|
"name": "idx_transaction_start_timestamp",
|
|
"columns": [
|
|
{
|
|
"expression": "start_timestamp",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"transaction_charge_point_id_charge_point_id_fk": {
|
|
"name": "transaction_charge_point_id_charge_point_id_fk",
|
|
"tableFrom": "transaction",
|
|
"tableTo": "charge_point",
|
|
"columnsFrom": [
|
|
"charge_point_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"transaction_connector_id_connector_id_fk": {
|
|
"name": "transaction_connector_id_connector_id_fk",
|
|
"tableFrom": "transaction",
|
|
"tableTo": "connector",
|
|
"columnsFrom": [
|
|
"connector_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |