{
    "schemaVersion": "1",
    "targetFamily": "sql",
    "target": "postgres",
    "profileHash": "3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2",
    "roots": {
        "accounts": {
            "model": "Account",
            "namespace": "public"
        },
        "conversations": {
            "model": "Conversation",
            "namespace": "public"
        },
        "messages": {
            "model": "Message",
            "namespace": "public"
        },
        "posts": {
            "model": "Post",
            "namespace": "public"
        }
    },
    "domain": {
        "namespaces": {
            "public": {
                "models": {
                    "Account": {
                        "fields": {
                            "createdAt": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "kind": "scalar"
                                }
                            },
                            "email": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            },
                            "id": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/int4@1",
                                    "kind": "scalar"
                                }
                            },
                            "name": {
                                "nullable": true,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            },
                            "updatedAt": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "kind": "scalar"
                                }
                            },
                            "username": {
                                "nullable": true,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            }
                        },
                        "relations": {
                            "posts": {
                                "cardinality": "1:N",
                                "on": {
                                    "localFields": [
                                        "id"
                                    ],
                                    "targetFields": [
                                        "authorId"
                                    ]
                                },
                                "to": {
                                    "model": "Post",
                                    "namespace": "public"
                                }
                            }
                        },
                        "storage": {
                            "fields": {
                                "createdAt": {
                                    "column": "createdAt"
                                },
                                "email": {
                                    "column": "email"
                                },
                                "id": {
                                    "column": "id"
                                },
                                "name": {
                                    "column": "name"
                                },
                                "updatedAt": {
                                    "column": "updatedAt"
                                },
                                "username": {
                                    "column": "username"
                                }
                            },
                            "namespaceId": "public",
                            "table": "accounts"
                        }
                    },
                    "Conversation": {
                        "fields": {
                            "channel": {
                                "nullable": true,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            },
                            "createdAt": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "kind": "scalar"
                                }
                            },
                            "id": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            },
                            "updatedAt": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "kind": "scalar"
                                }
                            }
                        },
                        "relations": {
                            "messages": {
                                "cardinality": "1:N",
                                "on": {
                                    "localFields": [
                                        "id"
                                    ],
                                    "targetFields": [
                                        "conversationId"
                                    ]
                                },
                                "to": {
                                    "model": "Message",
                                    "namespace": "public"
                                }
                            }
                        },
                        "storage": {
                            "fields": {
                                "channel": {
                                    "column": "channel"
                                },
                                "createdAt": {
                                    "column": "createdAt"
                                },
                                "id": {
                                    "column": "id"
                                },
                                "updatedAt": {
                                    "column": "updatedAt"
                                }
                            },
                            "namespaceId": "public",
                            "table": "conversations"
                        }
                    },
                    "Message": {
                        "fields": {
                            "content": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            },
                            "conversationId": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            },
                            "createdAt": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "kind": "scalar"
                                }
                            },
                            "id": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/int4@1",
                                    "kind": "scalar"
                                }
                            },
                            "role": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            }
                        },
                        "relations": {
                            "conversation": {
                                "cardinality": "N:1",
                                "nullable": false,
                                "on": {
                                    "localFields": [
                                        "conversationId"
                                    ],
                                    "targetFields": [
                                        "id"
                                    ]
                                },
                                "to": {
                                    "model": "Conversation",
                                    "namespace": "public"
                                }
                            }
                        },
                        "storage": {
                            "fields": {
                                "content": {
                                    "column": "content"
                                },
                                "conversationId": {
                                    "column": "conversationId"
                                },
                                "createdAt": {
                                    "column": "createdAt"
                                },
                                "id": {
                                    "column": "id"
                                },
                                "role": {
                                    "column": "role"
                                }
                            },
                            "namespaceId": "public",
                            "table": "messages"
                        }
                    },
                    "Post": {
                        "fields": {
                            "authorId": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/int4@1",
                                    "kind": "scalar"
                                }
                            },
                            "content": {
                                "nullable": true,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            },
                            "createdAt": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "kind": "scalar"
                                }
                            },
                            "id": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/int4@1",
                                    "kind": "scalar"
                                }
                            },
                            "title": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/text@1",
                                    "kind": "scalar"
                                }
                            },
                            "updatedAt": {
                                "nullable": false,
                                "type": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "kind": "scalar"
                                }
                            }
                        },
                        "relations": {
                            "author": {
                                "cardinality": "N:1",
                                "nullable": false,
                                "on": {
                                    "localFields": [
                                        "authorId"
                                    ],
                                    "targetFields": [
                                        "id"
                                    ]
                                },
                                "to": {
                                    "model": "Account",
                                    "namespace": "public"
                                }
                            }
                        },
                        "storage": {
                            "fields": {
                                "authorId": {
                                    "column": "authorId"
                                },
                                "content": {
                                    "column": "content"
                                },
                                "createdAt": {
                                    "column": "createdAt"
                                },
                                "id": {
                                    "column": "id"
                                },
                                "title": {
                                    "column": "title"
                                },
                                "updatedAt": {
                                    "column": "updatedAt"
                                }
                            },
                            "namespaceId": "public",
                            "table": "posts"
                        }
                    }
                }
            }
        }
    },
    "storage": {
        "namespaces": {
            "public": {
                "entries": {
                    "table": {
                        "accounts": {
                            "columns": {
                                "createdAt": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "default": {
                                        "expression": "now()",
                                        "kind": "function"
                                    },
                                    "nativeType": "timestamptz",
                                    "nullable": false
                                },
                                "email": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": false
                                },
                                "id": {
                                    "codecId": "pg/int4@1",
                                    "default": {
                                        "expression": "autoincrement()",
                                        "kind": "function"
                                    },
                                    "nativeType": "int4",
                                    "nullable": false
                                },
                                "name": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": true
                                },
                                "updatedAt": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "nativeType": "timestamptz",
                                    "nullable": false
                                },
                                "username": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": true
                                }
                            },
                            "foreignKeys": [],
                            "indexes": [],
                            "primaryKey": {
                                "columns": [
                                    "id"
                                ]
                            },
                            "uniques": [
                                {
                                    "columns": [
                                        "email"
                                    ]
                                },
                                {
                                    "columns": [
                                        "username"
                                    ]
                                }
                            ]
                        },
                        "conversations": {
                            "columns": {
                                "channel": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": true
                                },
                                "createdAt": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "default": {
                                        "expression": "now()",
                                        "kind": "function"
                                    },
                                    "nativeType": "timestamptz",
                                    "nullable": false
                                },
                                "id": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": false
                                },
                                "updatedAt": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "nativeType": "timestamptz",
                                    "nullable": false
                                }
                            },
                            "foreignKeys": [],
                            "indexes": [],
                            "primaryKey": {
                                "columns": [
                                    "id"
                                ]
                            },
                            "uniques": []
                        },
                        "messages": {
                            "columns": {
                                "content": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": false
                                },
                                "conversationId": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": false
                                },
                                "createdAt": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "default": {
                                        "expression": "now()",
                                        "kind": "function"
                                    },
                                    "nativeType": "timestamptz",
                                    "nullable": false
                                },
                                "id": {
                                    "codecId": "pg/int4@1",
                                    "default": {
                                        "expression": "autoincrement()",
                                        "kind": "function"
                                    },
                                    "nativeType": "int4",
                                    "nullable": false
                                },
                                "role": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": false
                                }
                            },
                            "foreignKeys": [
                                {
                                    "onDelete": "cascade",
                                    "source": {
                                        "columns": [
                                            "conversationId"
                                        ],
                                        "namespaceId": "public",
                                        "tableName": "messages"
                                    },
                                    "target": {
                                        "columns": [
                                            "id"
                                        ],
                                        "namespaceId": "public",
                                        "tableName": "conversations"
                                    }
                                }
                            ],
                            "indexes": [
                                {
                                    "columns": [
                                        "conversationId"
                                    ],
                                    "name": "messages_conversationId_idx_669215a6",
                                    "prefix": "messages_conversationId_idx",
                                    "unique": false
                                }
                            ],
                            "primaryKey": {
                                "columns": [
                                    "id"
                                ]
                            },
                            "uniques": []
                        },
                        "posts": {
                            "columns": {
                                "authorId": {
                                    "codecId": "pg/int4@1",
                                    "nativeType": "int4",
                                    "nullable": false
                                },
                                "content": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": true
                                },
                                "createdAt": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "default": {
                                        "expression": "now()",
                                        "kind": "function"
                                    },
                                    "nativeType": "timestamptz",
                                    "nullable": false
                                },
                                "id": {
                                    "codecId": "pg/int4@1",
                                    "default": {
                                        "expression": "autoincrement()",
                                        "kind": "function"
                                    },
                                    "nativeType": "int4",
                                    "nullable": false
                                },
                                "title": {
                                    "codecId": "pg/text@1",
                                    "nativeType": "text",
                                    "nullable": false
                                },
                                "updatedAt": {
                                    "codecId": "pg/timestamptz-string@1",
                                    "nativeType": "timestamptz",
                                    "nullable": false
                                }
                            },
                            "foreignKeys": [
                                {
                                    "onDelete": "cascade",
                                    "source": {
                                        "columns": [
                                            "authorId"
                                        ],
                                        "namespaceId": "public",
                                        "tableName": "posts"
                                    },
                                    "target": {
                                        "columns": [
                                            "id"
                                        ],
                                        "namespaceId": "public",
                                        "tableName": "accounts"
                                    }
                                }
                            ],
                            "indexes": [
                                {
                                    "columns": [
                                        "authorId"
                                    ],
                                    "name": "posts_authorId_idx_e47547ed",
                                    "prefix": "posts_authorId_idx",
                                    "unique": false
                                }
                            ],
                            "primaryKey": {
                                "columns": [
                                    "id"
                                ]
                            },
                            "uniques": []
                        }
                    }
                },
                "id": "public",
                "kind": "postgres-schema"
            }
        },
        "storageHash": "ce515282319cbb777a3517fb0040a3b0f020b3fbee1ad2b3c5f5a7673d09ce65"
    },
    "execution": {
        "executionHash": "21530d1b13556db12c1951e3b7552b3b211162c2b23d89c87fc1f2d0a13c1ed5",
        "mutations": {
            "defaults": [
                {
                    "onCreate": {
                        "id": "timestampNow",
                        "kind": "generator"
                    },
                    "onUpdate": {
                        "id": "timestampNow",
                        "kind": "generator"
                    },
                    "ref": {
                        "entry": "accounts",
                        "field": "updatedAt",
                        "namespace": "public"
                    }
                },
                {
                    "onCreate": {
                        "id": "uuidv4",
                        "kind": "generator"
                    },
                    "ref": {
                        "entry": "conversations",
                        "field": "id",
                        "namespace": "public"
                    }
                },
                {
                    "onCreate": {
                        "id": "timestampNow",
                        "kind": "generator"
                    },
                    "onUpdate": {
                        "id": "timestampNow",
                        "kind": "generator"
                    },
                    "ref": {
                        "entry": "conversations",
                        "field": "updatedAt",
                        "namespace": "public"
                    }
                },
                {
                    "onCreate": {
                        "id": "timestampNow",
                        "kind": "generator"
                    },
                    "onUpdate": {
                        "id": "timestampNow",
                        "kind": "generator"
                    },
                    "ref": {
                        "entry": "posts",
                        "field": "updatedAt",
                        "namespace": "public"
                    }
                }
            ]
        }
    },
    "capabilities": {
        "postgres": {
            "distinctOn": true,
            "jsonAgg": true,
            "lateral": true,
            "limit": true,
            "orderBy": true,
            "returning": true
        },
        "sql": {
            "checkConstraint": true,
            "defaultInInsert": true,
            "enums": true,
            "insertOnConflictSkip": true,
            "insertOnConflictWithoutTarget": true,
            "lateral": true,
            "returning": true,
            "scalarList": true
        }
    },
    "extensions": {},
    "meta": {},
    "_generated": {
        "warning": "⚠️  GENERATED FILE - DO NOT EDIT",
        "message": "This file is automatically generated by \"prisma contract emit\".",
        "regenerate": "To regenerate, run: prisma contract emit"
    }
}
