import { DatabaseType } from '@/lib/domain/database-type';
import type { Template } from '../templates-data';
import image from '@/assets/templates/bookstack-db.png';
import imageDark from '@/assets/templates/bookstack-db-dark.png';

const now = Date.now();

export const bookstackDb: Template = {
    slug: 'bookstack-database',
    name: 'BookStack',
    shortDescription: 'Simple & Free Wiki Software',
    description: 'Platform to create documentation/wiki',
    image,
    imageDark,
    tags: ['Open Source', 'Laravel', 'PHP'],
    featured: true,
    url: 'https://github.com/bookstackhq/bookstack',
    diagram: {
        id: 'bookstack_db',
        name: 'bookstack-database',
        createdAt: new Date(),
        updatedAt: new Date(),
        databaseType: DatabaseType.POSTGRESQL,
        tables: [
            {
                id: '0p0bfl8363rjgtq0bruhl1p2j',
                name: 'pages',
                schema: 'public',
                x: 893.792865795726,
                y: 23.692687665143126,
                fields: [
                    {
                        id: 'z0imxl03p43zqxl2gx9s0b0u3',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'cehxui3i1jrch2zslrhmruyuo',
                        name: 'book_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'l9egq2h60hmol4zqbdjdskno5',
                        name: 'chapter_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'np5905uuxwkafzscd9gj4ee44',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'r2pukmq9aaj2fea651phfd811',
                        name: 'slug',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ee2t4xwenyk7xsn04mai4u7tf',
                        name: 'html',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'u4wy6fctu2lk9tsechph4j25l',
                        name: 'text',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'wjqqxu9wcx99hdwygermpj3sp',
                        name: 'priority',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '5t7cpbuc57uq4elca4mk29eru',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'tdt0eyspyxx03cxd3p1faz9if',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'wzdyvqd6zjpbgk4dn5xwhzl37',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'u2ot1ren3z448rifj455ipp49',
                        name: 'updated_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'd55acx42h9fxr3lytypgp75vn',
                        name: 'restricted',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'pxmy3of7g6bveoujlv3d0gp72',
                        name: 'draft',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'u97zi149zbqnlrcf4ifv86ou5',
                        name: 'markdown',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '439bds5kimnme5em930f2vn59',
                        name: 'revision_count',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'sgmyyq1bj43bhe9n99289bgbr',
                        name: 'template',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'ja5u5stxighj95nzfr66qymfo',
                        name: 'pages_pkey',
                        unique: true,
                        fieldIds: ['z0imxl03p43zqxl2gx9s0b0u3'],
                        createdAt: now,
                    },
                ],
                color: '#4dee8a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '13q3i9mxzint9oxkpc2rk1naz',
                name: 'email_confirmations',
                schema: 'public',
                x: 512.4837944255734,
                y: 527.4598220212517,
                fields: [
                    {
                        id: 'q2hvlprlxdw1jz2lbw2988vlw',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'j1hzitou8lhpgtrohr7xdhk6e',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'tv631el2jq5nc6du0iadhcoih',
                        name: 'token',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'dtlapdwcxhahxiuubxf3bfgis',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'p05cssp7koup92v3y1wabcrvf',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '1pgi60xtedooeivtfd0ft0fhm',
                        name: 'email_confirmations_pkey',
                        unique: true,
                        fieldIds: ['q2hvlprlxdw1jz2lbw2988vlw'],
                        createdAt: now,
                    },
                ],
                color: '#ff6b8a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '1hehu41gs7argst56cm9qzcs0',
                name: 'views',
                schema: 'public',
                x: -381.94306549234545,
                y: 164.9440544848523,
                fields: [
                    {
                        id: '64sg53yy66mc3j0n6etrbktzi',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'nzm7gqfzhn0uspzmhu21eks9q',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '0gqigjj9q34tyciq2htrtyzax',
                        name: 'viewable_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ybx0acbq6o949t5ku3489yymb',
                        name: 'viewable_type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'mauqsjcqlaky03nc7zei3845r',
                        name: 'views',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '56h4bhcb66z6e2ghqvpc1ikf8',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'zmxl7n276k05qbjr8xt8f00g8',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'lm8pgzaeu2m27bcsp1d1rug7x',
                        name: 'views_pkey',
                        unique: true,
                        fieldIds: ['64sg53yy66mc3j0n6etrbktzi'],
                        createdAt: now,
                    },
                ],
                color: '#ff6363',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '1j8cyq48mykt7rpljyyjt3b0f',
                name: 'roles',
                schema: 'public',
                x: 512.1320343559644,
                y: 957.2767706041478,
                fields: [
                    {
                        id: 'lcv8tj6o1oawcle07ldl32wv0',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'wr01rfvcaj52euk95ypl402k8',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'dxwkgfsfkmflsbnwobvzva44h',
                        name: 'display_name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'yqtnr5z2gieoqyrfb8ywa9rsq',
                        name: 'description',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'lgi2bh9760vdbvglng4ghkht0',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'pr6mbtltq26lobsyac7c92i2h',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '90t22baxgc06cqfe8tfnqng0h',
                        name: 'system_name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '2cgrve961dkq256myt2kizivm',
                        name: 'external_auth_id',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'hieqit0fuo9kfw97mykr9l83u',
                        name: 'roles_pkey',
                        unique: true,
                        fieldIds: ['lcv8tj6o1oawcle07ldl32wv0'],
                        createdAt: now,
                    },
                ],
                color: '#8eb7ff',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '212gqanw3vfxwefa5btr3d20y',
                name: 'bookshelves_books',
                schema: 'public',
                x: 793.7928657957259,
                y: -409.3200142270762,
                fields: [
                    {
                        id: 'qu0ul1fhb7m5tbpb34qka9p67',
                        name: 'bookshelf_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '99dupuff5kfyef32njb8zitlt',
                        name: 'book_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ejxjxu05hqvjq3s36bs9bxqm9',
                        name: 'order',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 's4lynnhsbp3ubhgxgmzw3dc5n',
                        name: 'bookshelves_books_pkey',
                        unique: true,
                        fieldIds: [
                            'qu0ul1fhb7m5tbpb34qka9p67',
                            '99dupuff5kfyef32njb8zitlt',
                        ],
                        createdAt: now,
                    },
                ],
                color: '#8a61f5',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '258cijzf0pvtkggesc4x16j2q',
                name: 'page_revisions',
                schema: 'public',
                x: 1293.792865795726,
                y: 23.692687665143126,
                fields: [
                    {
                        id: '75cod88zu64fg5fb2mxjdhyn3',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'bxbphzx536svr6mi1jw61di7v',
                        name: 'page_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '53q8lnrxzf650jmmde19f1po6',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'vzz11dn19b1ai1xtilcu5tk5v',
                        name: 'html',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'jyyd85txtmnvsor4p92w38tkv',
                        name: 'text',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'lho7fmr6cuo5wcrtob4yx03sy',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'tlu1m21cgv5dyxf5hvrqnch2s',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'x78zbbopdw5j9ikt4y2sc6kpf',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'zqa5eq41cjoewofu5ghxri6pi',
                        name: 'slug',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'jhanokt4rg1zpeawj86mgug2j',
                        name: 'book_slug',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '0k71vssf9lrxkthwk993uis6d',
                        name: 'type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'cjdy4vux3sr11smiodbp78her',
                        name: 'markdown',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'oi1atsnbj4gym9o47iyo8miy2',
                        name: 'summary',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'tkz2hbuo4ejevju9yvq5wxp3c',
                        name: 'revision_number',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '0rd6xmwf7q79zg3ax81dmjts8',
                        name: 'page_revisions_pkey',
                        unique: true,
                        fieldIds: ['75cod88zu64fg5fb2mxjdhyn3'],
                        createdAt: now,
                    },
                ],
                color: '#8a61f5',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '25azrc7q6ehhzxeky9wy2ym77',
                name: 'role_user',
                schema: 'public',
                x: -206.06601717798202,
                y: 639.0787190702015,
                fields: [
                    {
                        id: 'esjif1koqgijsdylxmvkzcwow',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'k21wp8nwphy6wjlxkxogtsxk9',
                        name: 'role_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '7ee6c95zqh7umkdvtdq9a909p',
                        name: 'role_user_pkey',
                        unique: true,
                        fieldIds: [
                            'esjif1koqgijsdylxmvkzcwow',
                            'k21wp8nwphy6wjlxkxogtsxk9',
                        ],
                        createdAt: now,
                    },
                ],
                color: '#ffe374',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '29vcs6ejy32epmzx3y4vqh5c2',
                name: 'bookshelves',
                schema: 'public',
                x: -406.20713420427404,
                y: -259.3200142270762,
                fields: [
                    {
                        id: '7j2apu026w6feau3x81p72xm2',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ex7dl4fvc8b7cuhfs1zhs8vda',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'uh7aw873owq9mpq2j0l6dvnw0',
                        name: 'slug',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '95zd6580y73d2ryqo8zwbcs86',
                        name: 'description',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'aw0yps1ndnijx9cjmies04aif',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'x9k5w5ytbjqop78gi6urb7uoq',
                        name: 'updated_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'ciwbgz14s9ujlq8h8gpth2k0y',
                        name: 'restricted',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'edb5koj2lzkommgc78fhtuo8m',
                        name: 'image_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'z2tqx6rxeks7p3lfpm682pps0',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '9sgfshn8t9rrq48jy8g2tjjmb',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'kd9i51inlu8ky8tkjk7q378tx',
                        name: 'bookshelves_pkey',
                        unique: true,
                        fieldIds: ['7j2apu026w6feau3x81p72xm2'],
                        createdAt: now,
                    },
                ],
                color: '#ff6363',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '4dfq98pwycdzwsrc65uxg3911',
                name: 'permission_role',
                schema: 'public',
                x: 912.1320343559644,
                y: 957.2767706041478,
                fields: [
                    {
                        id: 'nlrftwf9afekq1gjmy1vpp2h8',
                        name: 'permission_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'i3wratnje3wjvfgcd0dogktnq',
                        name: 'role_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '7peiq4564pmqeerjjtfovsncy',
                        name: 'permission_role_pkey',
                        unique: true,
                        fieldIds: [
                            'nlrftwf9afekq1gjmy1vpp2h8',
                            'i3wratnje3wjvfgcd0dogktnq',
                        ],
                        createdAt: now,
                    },
                ],
                color: '#ffe374',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '4mpa6gwunaa9my7pcsxc91na5',
                name: 'activities',
                schema: 'public',
                x: 193.79286579572587,
                y: -876.3073123348568,
                fields: [
                    {
                        id: 'uo1a4jah6mjmrkfi8m10f5f91',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'iartqit3b5n2o2sp8epdboi6x',
                        name: 'key',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'w121ppfw9v7nsyeprfmbz84wk',
                        name: 'extra',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'nnpls3zx6976fvuqd7g4mngaf',
                        name: 'book_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'drp82lh8pro4vt5toq099h3at',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ugyae99a6vtr7jsh8fv16vydv',
                        name: 'entity_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'da98f95zd4futgvgculjpcgh6',
                        name: 'entity_type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '4clchrfggycp8w5id7bjk1iim',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '1w9hbdjw79i1ywup37h2pnunr',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'kuij8zh2414im9ziicz4g5p4y',
                        name: 'activities_pkey',
                        unique: true,
                        fieldIds: ['uo1a4jah6mjmrkfi8m10f5f91'],
                        createdAt: now,
                    },
                ],
                color: '#8eb7ff',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '5hlisywtzax02ttqm13osjnzy',
                name: 'tags',
                schema: 'public',
                x: -324.4051857382205,
                y: -727.5180657610224,
                fields: [
                    {
                        id: '2yyt9k64fs54yjxwrlge1lstx',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 's8wrhc0nybzodf9b28jb2bw7m',
                        name: 'entity_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'msqahlolemk1kcdykxe1dh1m0',
                        name: 'entity_type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'a8vm6x49z2702brkqxdtllkl5',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'irya6q91kacnbhsid1vqutny3',
                        name: 'value',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '18thxfvpq1suzhlkg4rnas08u',
                        name: 'order',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ss4i8g3q72erqb9kj5jpg26s0',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'yc0etv5mb6qhc5jnvsyr7t94z',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'eax1m16mjbcp6lam12ckf4637',
                        name: 'tags_pkey',
                        unique: true,
                        fieldIds: ['2yyt9k64fs54yjxwrlge1lstx'],
                        createdAt: now,
                    },
                ],
                color: '#4dee8a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '6co2lcrmtrmx5xwd8y8mp2nxi',
                name: 'migrations',
                schema: 'public',
                x: 2350.7883370761033,
                y: -906.4221866344046,
                fields: [
                    {
                        id: 'a6qds4wbx3p2f66obd3qo3g82',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '47uah95eji6a5ucebt43z8w14',
                        name: 'migration',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'zebfachtpgp7ywqd9m9i2lm38',
                        name: 'batch',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'cpe33chpsejpxpvj4dng416d0',
                        name: 'migrations_pkey',
                        unique: true,
                        fieldIds: ['a6qds4wbx3p2f66obd3qo3g82'],
                        createdAt: now,
                    },
                ],
                color: '#ff9f74',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '6uujngm59pvlvj1tyckthhs20',
                name: 'sessions',
                schema: 'public',
                x: 500,
                y: 100,
                fields: [
                    {
                        id: 'lbd9wf82tezcc8ml3b204ia2s',
                        name: 'id',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'jep6zsmgqghw1otgqi2cxukz2',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'zjwam36hetevqjyr1uzew6sho',
                        name: 'ip_address',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'lov2tezyi98kc43lv2r2pjwas',
                        name: 'user_agent',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'ozbccnwu9gugrz6oi8jii2f1j',
                        name: 'payload',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '7qr3e7ft54t5g8mpn06wq2oxp',
                        name: 'last_activity',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [],
                color: '#c05dcf',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '7d1nou9ocvxpys1x70dy5pl7q',
                name: 'user_invites',
                schema: 'public',
                x: 169.45927106677215,
                y: 592.403876506104,
                fields: [
                    {
                        id: 'y2fh302if7s5y0ck3of07bdgs',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'tr18mawe8hogbc2kkbnigc4lg',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'nfxehffkzbn4ejraz64labajx',
                        name: 'token',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ybg8gwgopmmhqef5fhphyc4vt',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'yay7nbzscxet7o9fqp24xfjk7',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '6bi9c23auzomfifx24pistio0',
                        name: 'user_invites_pkey',
                        unique: true,
                        fieldIds: ['y2fh302if7s5y0ck3of07bdgs'],
                        createdAt: now,
                    },
                ],
                color: '#9ef07a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '8an71asyvry6nh48cv6r1qv87',
                name: 'chapters',
                schema: 'public',
                x: 843.7928657957261,
                y: 456.7053895573625,
                fields: [
                    {
                        id: 'm300itd5img9630sh9g3zpwph',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '0qbesv0d0v0wo897v77bwsc7l',
                        name: 'book_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '1z71okm9qqejaix0zs23s4hfb',
                        name: 'slug',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'dhemeuftk7vw6df2jznear3ih',
                        name: 'name',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '9lwn6je2asitdsh69yg6wgw4r',
                        name: 'description',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '5kxz56fryp3i5il11ifwss7vy',
                        name: 'priority',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 's69xwmvstmhbpbjoeexox9aqz',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'eqyxvi8ivekiefvsad2vfd3ei',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'jwww9jgkvcamvaz9fzubr5qoi',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'okkd93gyevd7d8f2m6roj4tpf',
                        name: 'updated_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'gac07eweoil8c60oi6ay3xehs',
                        name: 'restricted',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '0qlmqyrlyb8sw04xd2869ffdw',
                        name: 'chapters_pkey',
                        unique: true,
                        fieldIds: ['m300itd5img9630sh9g3zpwph'],
                        createdAt: now,
                    },
                ],
                color: '#4dee8a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'aaovrmpl0i2m79gn0df117sef',
                name: 'cache',
                schema: 'public',
                x: 2311.6170956611595,
                y: -304.55386095043616,
                fields: [
                    {
                        id: 'fmg3maj1kedk2et5dwiv95zxf',
                        name: 'key',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'fvt3e3yb9n2ez0z1o9r5vvhmr',
                        name: 'value',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'jajc295h5ggwuxj2q5sj7xh2n',
                        name: 'expiration',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [],
                color: '#8eb7ff',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'c27blwjel9on63xgjf0wtds79',
                name: 'api_tokens',
                schema: 'public',
                x: 536.3961030678925,
                y: -969.4088049601121,
                fields: [
                    {
                        id: 'swojnhr2kw7qlfrpnkkw33il0',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'em4yiv8q7d4fgkp8rzgtcfm23',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'plxmsfduwtxz3wdex4rxxpd1h',
                        name: 'token_id',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'rirwrdcqnuw4t0a2qrt96bdx7',
                        name: 'secret',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '8wnbdj7pe98yadh0xfs8naazc',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ntg7eyiozjkt31nuija2cf7gf',
                        name: 'expires_at',
                        type: {
                            id: 'date',
                            name: 'date',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'v7hqukl0de1by63qpllndcch9',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'ss9n929r1k6mvdfb5ksv8gzwt',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'ijp2urz21psfndtji4v2ofup9',
                        name: 'api_tokens_pkey',
                        unique: true,
                        fieldIds: ['swojnhr2kw7qlfrpnkkw33il0'],
                        createdAt: now,
                    },
                ],
                color: '#ff6b8a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'fqdykkgqtklmwaoqomnrp8whu',
                name: 'search_terms',
                schema: 'public',
                x: 2750.7883370761033,
                y: -906.4221866344046,
                fields: [
                    {
                        id: '6rhfogu2qhqt18voshoe22ifk',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'lehqzh7fm3w3wtrcypy8cgky3',
                        name: 'term',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'kofir8tdiw7qevuuu0wslxpv0',
                        name: 'entity_type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '0lv3bjbf8kybhwre471pof4w5',
                        name: 'entity_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'bk2ny864sjcffumagdvigiuwe',
                        name: 'score',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '0b2tc56vvzxcepcc868swno9z',
                        name: 'search_terms_pkey',
                        unique: true,
                        fieldIds: ['6rhfogu2qhqt18voshoe22ifk'],
                        createdAt: now,
                    },
                ],
                color: '#42e0c0',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'in6lk9b0j608xq5leqhf46930',
                name: 'password_resets',
                schema: 'public',
                x: 1911.6170956611595,
                y: -304.55386095043616,
                fields: [
                    {
                        id: 'o2s3rg9qrtjiso9l3mp2n1l6v',
                        name: 'email',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ait9g10ub0ew9syswmelzdfrf',
                        name: 'token',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '7wuyquhtv1664bzvriyszg6oo',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [],
                color: '#9ef07a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'j2ap2x9myjzuzsg5x3mni4hza',
                name: 'entity_permissions',
                schema: 'public',
                x: 112.1320343559644,
                y: 1107.276770604148,
                fields: [
                    {
                        id: '1i0v6q0tvv9xj2dustjvsbjgf',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'i74q244tqwwbpmm8pelttv0cp',
                        name: 'restrictable_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '81w5ic6xrbkpp6mxk0hgcrlw0',
                        name: 'restrictable_type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ypl7w4h0a17e3fnuyogv7xvc8',
                        name: 'role_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'dqsmdfxgklmavug3zst9jn2nx',
                        name: 'action',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '8pe195bke65d04dwpu2xrma4f',
                        name: 'entity_permissions_pkey',
                        unique: true,
                        fieldIds: ['1i0v6q0tvv9xj2dustjvsbjgf'],
                        createdAt: now,
                    },
                ],
                color: '#9ef07a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'j930si2u0ei1eus0aulfutmav',
                name: 'users',
                schema: 'public',
                x: 100,
                y: 100,
                fields: [
                    {
                        id: '4z39qte1ylydsrs8ceuonrz5d',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ferjawhfangpi1rfm0c96rh28',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'sgv89qsjagbd4836kizyb6ehe',
                        name: 'email',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ab1ybg8u5rtnfvuzs4a8bhrr4',
                        name: 'password',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '4j2lgbxno7dv9imgguj7433wa',
                        name: 'remember_token',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'a7cl5p9lif0b7u34mzd4fas8h',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'j9yg1bn1y9qmgbstvtuxyso3b',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 's1ixhglhedm8xegibrcqenofw',
                        name: 'email_confirmed',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '5yt6emarazew599412uhbncg6',
                        name: 'image_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'fur9arfr26m51pk9ki8i1vsf0',
                        name: 'external_auth_id',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'lymt4dfg7x7hti9i0wu1phaea',
                        name: 'system_name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '13anjbrdh5gng9i18lqy45q8e',
                        name: 'users_pkey',
                        unique: true,
                        fieldIds: ['4z39qte1ylydsrs8ceuonrz5d'],
                        createdAt: now,
                    },
                ],
                color: '#c05dcf',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'jb7dzqgd2693v7azj2u2zv0xv',
                name: 'comments',
                schema: 'public',
                x: -732.6003364542951,
                y: 216.20824392050065,
                fields: [
                    {
                        id: '2k4rwaq5vve6qk43uei3vx7fx',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '5i78dyukeoubdvxwcg8a2dsp8',
                        name: 'entity_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 't18wgx3k6b6hxv9abwsb7ooth',
                        name: 'entity_type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '3hvu3iu55gqxju38gy1zgvxv8',
                        name: 'text',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'a3fy4dj7xhfmi1578qta20y98',
                        name: 'html',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '3j1c2dxreo4j955gzye1sfrlg',
                        name: 'parent_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'uavt4tpmfuj01s19wum27comj',
                        name: 'local_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'vrzfcsrgrf1kxucus5bkxm9te',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'cx2nuk8k4nena2n5uza098zrg',
                        name: 'updated_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'pmd8wavf1454t37hh5ikvgsud',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '5214lke5ei7achifor1csuxi5',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'o6idjndpazsita6ohdcounudg',
                        name: 'comments_pkey',
                        unique: true,
                        fieldIds: ['2k4rwaq5vve6qk43uei3vx7fx'],
                        createdAt: now,
                    },
                ],
                color: '#ffe374',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'k5r0mdreclzriaehomveagh6n',
                name: 'settings',
                schema: 'public',
                x: 1150.7883370761033,
                y: -906.4221866344046,
                fields: [
                    {
                        id: '67i7z293j479xqvo8cau34w5d',
                        name: 'setting_key',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'qud1389a7e5xru6ob53wj2joh',
                        name: 'value',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'b4tk3w9zzbfanghqrjo38x1ju',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'ylai7c8uxgcebwqk4wwn6gpyb',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '89ewdkf20ra9hjizu0qwvbmba',
                        name: 'settings_pkey',
                        unique: true,
                        fieldIds: ['67i7z293j479xqvo8cau34w5d'],
                        createdAt: now,
                    },
                ],
                color: '#9ef07a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'lyg6lpdaj6gp47vfkuljuo8d3',
                name: 'books',
                schema: 'public',
                x: 393.79286579572596,
                y: -409.3200142270762,
                fields: [
                    {
                        id: '5s4tcowk3ea9urnklgj4rj0kv',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '3ndjieu3tmzzt6p3egv43vmsa',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'c8ijuhvm5xyw5zq9wc9exj20r',
                        name: 'slug',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'v3bn07j6inoin9njlochokvov',
                        name: 'description',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'rnc6ytdtb3s3trpsuzyw42yiu',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'epqzotngxcqzknxt8hz97hdi3',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '2ucplmhyleqqa5tf6zq3cuo4w',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '2g3qyc35h5rqzk4m2657b2i5z',
                        name: 'updated_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '2og6hcqqn1v90mzwe3ks36d10',
                        name: 'restricted',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '4qz6m1dwrns7ldwk8ysblekid',
                        name: 'image_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'po63enur3i9kcs0s07m9pvdb4',
                        name: 'books_pkey',
                        unique: true,
                        fieldIds: ['5s4tcowk3ea9urnklgj4rj0kv'],
                        createdAt: now,
                    },
                ],
                color: '#ff6363',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'mrcbxmeh3dokmkfoqkcnmsv1x',
                name: 'attachments',
                schema: 'public',
                x: 1950.7883370761033,
                y: -906.4221866344046,
                fields: [
                    {
                        id: 'ndu15xj3z93qphxqxs5hdprwi',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'brf4wxlacgpru1k7dtl7v79jd',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '6evfoo83eb9cijkbe381xi9u8',
                        name: 'path',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'pddjnspuye0c8yyykltoq0246',
                        name: 'extension',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'exzujism505lrf8b34u3uvmvm',
                        name: 'uploaded_to',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ev68wm8miig3wytqcfvvn7ew9',
                        name: 'external',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'd6fmspeborkg6pchtin07a1yf',
                        name: 'order',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'bbajx7b31juw07fhhl44svmt1',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'zyafmy81a1xe3etd4znwtq721',
                        name: 'updated_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'q6470h8jikj1ywlo60x0c3j8z',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '2egobyq5h6p7paaoxmu8be3hj',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'fgtmm5p39t6yxs98sr27m6x5g',
                        name: 'attachments_pkey',
                        unique: true,
                        fieldIds: ['ndu15xj3z93qphxqxs5hdprwi'],
                        createdAt: now,
                    },
                ],
                color: '#ff9f74',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'p5eqdhwf8svmqppfyeb6b9xux',
                name: 'role_permissions',
                schema: 'public',
                x: 1550.7883370761033,
                y: -906.4221866344046,
                fields: [
                    {
                        id: 'auo1tqbjqoz90yry1rujb6avu',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'jxhpggc3dd4u8i1mo8hszuorp',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '6qj5x6ydfucbzstlcnjpyr5ey',
                        name: 'display_name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'qj9o7ywxbjjrrsquzej0ygg4w',
                        name: 'description',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '9m0wplvpxfj5ovnwgt9acn2tu',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'aqipqxz3ylj3sfwknn6cphqsl',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'whhdqw9c41m7jfc7ra27o5cz2',
                        name: 'role_permissions_pkey',
                        unique: true,
                        fieldIds: ['auo1tqbjqoz90yry1rujb6avu'],
                        createdAt: now,
                    },
                ],
                color: '#42e0c0',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'pyvup3axsznl4q9wglheoim3s',
                name: 'social_accounts',
                schema: 'public',
                x: -806.2071342042741,
                y: -601.3401575527449,
                fields: [
                    {
                        id: 'paobnzrdd1nre2e91beqzzc3c',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '1tk6n4hwyuwqh6s6b59k1rnmh',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '4bvafdnsd7vd95y6bgpbsbqr3',
                        name: 'driver',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'j8kas5ykr7z4v0xbabqnd9ccv',
                        name: 'driver_id',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '1t1ka9mp7pg2tr0d5y4psfn1j',
                        name: 'avatar',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'po0m5c592p7uqio9vm3gbnyeq',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'ys3zudl75xj9k9713joq5sehj',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'tnrmb05xt3oo86f4v745r2qm6',
                        name: 'social_accounts_pkey',
                        unique: true,
                        fieldIds: ['paobnzrdd1nre2e91beqzzc3c'],
                        createdAt: now,
                    },
                ],
                color: '#ff9f74',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'xi9hdg2g5t7z4dy0tbjrehq4u',
                name: 'joint_permissions',
                schema: 'public',
                x: -375.43462870608255,
                y: 915.9586409344377,
                fields: [
                    {
                        id: 'fdwbg1ndod01wcftodzcrroyh',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'tyos257fifhj74tex5debmpya',
                        name: 'role_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '2mz65ec0bqdip7fv130ue8fa1',
                        name: 'entity_type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'w7k5j39ccdjt3nkm8zpe3ivsb',
                        name: 'entity_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'pzj0jke0aa169u5aenww6yc8e',
                        name: 'action',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'b4l4p7ihx1vcs5lf2blmbkbsl',
                        name: 'has_permission',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '4dbdyva6jeurc1f9rjqtblf7g',
                        name: 'has_permission_own',
                        type: {
                            id: 'smallint',
                            name: 'smallint',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'c31txqpxbgfidw2ai5nijqeyz',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '6w4nlxvmrakjwr71i22pnr2r6',
                        name: 'joint_permissions_pkey',
                        unique: true,
                        fieldIds: ['fdwbg1ndod01wcftodzcrroyh'],
                        createdAt: now,
                    },
                ],
                color: '#c05dcf',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'yvgc12bwmuqrgzn9bs41tooqa',
                name: 'images',
                schema: 'public',
                x: -6.207134204274069,
                y: -409.3200142270762,
                fields: [
                    {
                        id: 'e9y1k2q7wf0u0zlke7j50ae8s',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'csd9t7sk9m53ejszgzrc98ovw',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '1cjn5faof1f4jo6xl9k8sil61',
                        name: 'url',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'mscew6gxzfl6xu4a4zlrj0rkl',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'otszmsb4dx2szr4bjonykqi3f',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '9bfq16ga8cjce03lky16bc9pl',
                        name: 'created_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '1cpazrvjcbxs7b61vx1f9sz83',
                        name: 'updated_by',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'iiyddryzqx6w9rfdv2inoa134',
                        name: 'path',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'hqceckliitmql1kykev5q1265',
                        name: 'type',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'zw1mbxj0nf1zfffcljb4g1tp7',
                        name: 'uploaded_to',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '3k5y0gsx0la45kkccmgsktowz',
                        name: 'images_pkey',
                        unique: true,
                        fieldIds: ['e9y1k2q7wf0u0zlke7j50ae8s'],
                        createdAt: now,
                    },
                ],
                color: '#42e0c0',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
        ],
        relationships: [
            {
                id: '0452r5x5lu3isu6cqd8sj6800',
                name: 'bookshelves_books_book_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '212gqanw3vfxwefa5btr3d20y',
                targetTableId: 'lyg6lpdaj6gp47vfkuljuo8d3',
                sourceFieldId: '99dupuff5kfyef32njb8zitlt',
                targetFieldId: '5s4tcowk3ea9urnklgj4rj0kv',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '0j4lbrhd8whcl6vk6xqarx2cv',
                name: 'role_user_user_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '25azrc7q6ehhzxeky9wy2ym77',
                targetTableId: 'j930si2u0ei1eus0aulfutmav',
                sourceFieldId: 'esjif1koqgijsdylxmvkzcwow',
                targetFieldId: '4z39qte1ylydsrs8ceuonrz5d',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '0zz1bdcqbe3y6uvbnv1ittpfw',
                name: 'tags_entity_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '5hlisywtzax02ttqm13osjnzy',
                targetTableId: 'lyg6lpdaj6gp47vfkuljuo8d3',
                sourceFieldId: 's8wrhc0nybzodf9b28jb2bw7m',
                targetFieldId: '5s4tcowk3ea9urnklgj4rj0kv',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '2cziiqfzxhhv8qm0apb2b3ttl',
                name: 'activities_entity_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '4mpa6gwunaa9my7pcsxc91na5',
                targetTableId: '29vcs6ejy32epmzx3y4vqh5c2',
                sourceFieldId: 'ugyae99a6vtr7jsh8fv16vydv',
                targetFieldId: '7j2apu026w6feau3x81p72xm2',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '2nm5ana1iagjlou587yihdob2',
                name: 'permission_role_role_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '4dfq98pwycdzwsrc65uxg3911',
                targetTableId: '1j8cyq48mykt7rpljyyjt3b0f',
                sourceFieldId: 'i3wratnje3wjvfgcd0dogktnq',
                targetFieldId: 'lcv8tj6o1oawcle07ldl32wv0',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '60uopdvnqct32svkq4igggleg',
                name: 'activities_book_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '4mpa6gwunaa9my7pcsxc91na5',
                targetTableId: 'lyg6lpdaj6gp47vfkuljuo8d3',
                sourceFieldId: 'nnpls3zx6976fvuqd7g4mngaf',
                targetFieldId: '5s4tcowk3ea9urnklgj4rj0kv',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '85kox874ooq32anqyiq80lm3t',
                name: 'page_revisions_page_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '258cijzf0pvtkggesc4x16j2q',
                targetTableId: '0p0bfl8363rjgtq0bruhl1p2j',
                sourceFieldId: 'bxbphzx536svr6mi1jw61di7v',
                targetFieldId: 'z0imxl03p43zqxl2gx9s0b0u3',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '8mgbz16jorwx21ablil4w7mn7',
                name: 'pages_chapter_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '0p0bfl8363rjgtq0bruhl1p2j',
                targetTableId: '8an71asyvry6nh48cv6r1qv87',
                sourceFieldId: 'l9egq2h60hmol4zqbdjdskno5',
                targetFieldId: 'm300itd5img9630sh9g3zpwph',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '8nxllyzqumkxo9z12j1131yy4',
                name: 'joint_permissions_role_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'xi9hdg2g5t7z4dy0tbjrehq4u',
                targetTableId: '1j8cyq48mykt7rpljyyjt3b0f',
                sourceFieldId: 'tyos257fifhj74tex5debmpya',
                targetFieldId: 'lcv8tj6o1oawcle07ldl32wv0',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '9mxf7aa6iip1heum5509k5ek9',
                name: 'views_viewable_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '1hehu41gs7argst56cm9qzcs0',
                targetTableId: '29vcs6ejy32epmzx3y4vqh5c2',
                sourceFieldId: '0gqigjj9q34tyciq2htrtyzax',
                targetFieldId: '7j2apu026w6feau3x81p72xm2',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'dmg5znhinm1qnsqkdc34q7ypr',
                name: 'comments_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'jb7dzqgd2693v7azj2u2zv0xv',
                targetTableId: '29vcs6ejy32epmzx3y4vqh5c2',
                sourceFieldId: '2k4rwaq5vve6qk43uei3vx7fx',
                targetFieldId: '7j2apu026w6feau3x81p72xm2',
                sourceCardinality: 'one',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'e217buv2qnmaoigkxvdcfzgjd',
                name: 'users_image_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'j930si2u0ei1eus0aulfutmav',
                targetTableId: 'yvgc12bwmuqrgzn9bs41tooqa',
                sourceFieldId: '5yt6emarazew599412uhbncg6',
                targetFieldId: 'e9y1k2q7wf0u0zlke7j50ae8s',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'efsf8lhzafvhfrgvyjhhqoosh',
                name: 'views_user_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '1hehu41gs7argst56cm9qzcs0',
                targetTableId: 'j930si2u0ei1eus0aulfutmav',
                sourceFieldId: 'nzm7gqfzhn0uspzmhu21eks9q',
                targetFieldId: '4z39qte1ylydsrs8ceuonrz5d',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'eplibgez880j5p1gb59xkzvlm',
                name: 'api_tokens_user_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'c27blwjel9on63xgjf0wtds79',
                targetTableId: 'j930si2u0ei1eus0aulfutmav',
                sourceFieldId: '8wnbdj7pe98yadh0xfs8naazc',
                targetFieldId: '4z39qte1ylydsrs8ceuonrz5d',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'glmt7zw5qnjcgmfhwne89w2dw',
                name: 'books_image_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'lyg6lpdaj6gp47vfkuljuo8d3',
                targetTableId: 'yvgc12bwmuqrgzn9bs41tooqa',
                sourceFieldId: '4qz6m1dwrns7ldwk8ysblekid',
                targetFieldId: 'e9y1k2q7wf0u0zlke7j50ae8s',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'ikefah8t6tidf1xiuaqo4gtwt',
                name: 'user_invites_user_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '7d1nou9ocvxpys1x70dy5pl7q',
                targetTableId: 'j930si2u0ei1eus0aulfutmav',
                sourceFieldId: 'tr18mawe8hogbc2kkbnigc4lg',
                targetFieldId: '4z39qte1ylydsrs8ceuonrz5d',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'imtmhxxjl6b913am3752vnaku',
                name: 'bookshelves_books_bookshelf_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '212gqanw3vfxwefa5btr3d20y',
                targetTableId: '29vcs6ejy32epmzx3y4vqh5c2',
                sourceFieldId: 'qu0ul1fhb7m5tbpb34qka9p67',
                targetFieldId: '7j2apu026w6feau3x81p72xm2',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'jgujs682retrc2ku95oym0krj',
                name: 'email_confirmations_user_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '13q3i9mxzint9oxkpc2rk1naz',
                targetTableId: 'j930si2u0ei1eus0aulfutmav',
                sourceFieldId: 'j1hzitou8lhpgtrohr7xdhk6e',
                targetFieldId: '4z39qte1ylydsrs8ceuonrz5d',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'pbuhn3hdau5214lf44y8mrd4q',
                name: 'chapters_book_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '8an71asyvry6nh48cv6r1qv87',
                targetTableId: 'lyg6lpdaj6gp47vfkuljuo8d3',
                sourceFieldId: '0qbesv0d0v0wo897v77bwsc7l',
                targetFieldId: '5s4tcowk3ea9urnklgj4rj0kv',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'qpof51nf55owgcpiafxdykgqm',
                name: 'pages_book_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '0p0bfl8363rjgtq0bruhl1p2j',
                targetTableId: 'lyg6lpdaj6gp47vfkuljuo8d3',
                sourceFieldId: 'cehxui3i1jrch2zslrhmruyuo',
                targetFieldId: '5s4tcowk3ea9urnklgj4rj0kv',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'qw85tta3lvtg1ytte4ljcqja2',
                name: 'bookshelves_image_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '29vcs6ejy32epmzx3y4vqh5c2',
                targetTableId: 'yvgc12bwmuqrgzn9bs41tooqa',
                sourceFieldId: 'edb5koj2lzkommgc78fhtuo8m',
                targetFieldId: 'e9y1k2q7wf0u0zlke7j50ae8s',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'uqqn92zos8uv5fjk5ajzqrg4d',
                name: 'role_user_role_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '25azrc7q6ehhzxeky9wy2ym77',
                targetTableId: '1j8cyq48mykt7rpljyyjt3b0f',
                sourceFieldId: 'k21wp8nwphy6wjlxkxogtsxk9',
                targetFieldId: 'lcv8tj6o1oawcle07ldl32wv0',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'xwpw5k26hjxz9cvtrgp41m49h',
                name: 'activities_user_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '4mpa6gwunaa9my7pcsxc91na5',
                targetTableId: 'j930si2u0ei1eus0aulfutmav',
                sourceFieldId: 'drp82lh8pro4vt5toq099h3at',
                targetFieldId: '4z39qte1ylydsrs8ceuonrz5d',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'yeedksphqxe5e5jzhxby6jqq5',
                name: 'entity_permissions_role_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'j2ap2x9myjzuzsg5x3mni4hza',
                targetTableId: '1j8cyq48mykt7rpljyyjt3b0f',
                sourceFieldId: 'ypl7w4h0a17e3fnuyogv7xvc8',
                targetFieldId: 'lcv8tj6o1oawcle07ldl32wv0',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'yfeww29uhfrsikgnqcsg50go4',
                name: 'social_accounts_user_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'pyvup3axsznl4q9wglheoim3s',
                targetTableId: 'j930si2u0ei1eus0aulfutmav',
                sourceFieldId: '1tk6n4hwyuwqh6s6b59k1rnmh',
                targetFieldId: '4z39qte1ylydsrs8ceuonrz5d',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'yflgnsnvijmsn0ehhnoq7y547',
                name: 'sessions_user_id_foreign',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '6uujngm59pvlvj1tyckthhs20',
                targetTableId: 'j930si2u0ei1eus0aulfutmav',
                sourceFieldId: 'jep6zsmgqghw1otgqi2cxukz2',
                targetFieldId: '4z39qte1ylydsrs8ceuonrz5d',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
        ],
        dependencies: [],
    },
};
