Skip to content

Database diagrams editor that allows you to visualize and design your DB with a single query.

43.5 KB
Raw Blame
import { DatabaseType } from '@/lib/domain/database-type';
import type { Template } from '../templates-data';
import image from '@/assets/templates/akaunting.png';
import imageDark from '@/assets/templates/akaunting-dark.png';

const now = Date.now();

export const akauntingDb: Template = {
    slug: 'akaunting-database',
    name: 'Akaunting',
    shortDescription: 'Online Accounting Software',
    description: `For small businesses and freelancers, built with Laravel and VueJS`,
    image,
    imageDark,
    tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
    featured: false,
    url: 'https://github.com/akaunting/akaunting',
    diagram: {
        id: 'akaunting_db',
        name: 'akaunting-database',
        createdAt: new Date(),
        updatedAt: new Date(),
        databaseType: DatabaseType.POSTGRESQL,
        tables: [
            {
                id: '3c97shz3xxm4j7v2mrdsc2ak3',
                name: 'order_items',
                schema: 'public',
                x: 100.00000000000003,
                y: 600,
                fields: [
                    {
                        id: 'o38pf6tg52otihdco5cd9xrnu',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('order_items_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: '8kg1r7v71fwebyobnb13d1olw',
                        name: 'order_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'fs0yfmtemll2heqy2s50yw5c7',
                        name: 'product_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '03h16qxipz1aiuc2oiprgxs0n',
                        name: 'quantity',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'kim267xkk5d9a0lodcb6c40yq',
                        name: 'price',
                        type: {
                            id: 'numeric',
                            name: 'numeric',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        precision: 10,
                        scale: 2,
                        createdAt: now,
                    },
                    {
                        id: 'utsau6dicpr9v7c753g9r49vt',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                    {
                        id: '19v9seo2kw336kyq9oimjucki',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: '6c3z6qnpl7qw3s6zf4r7z6pqk',
                        name: 'order_items_pkey',
                        unique: true,
                        fieldIds: ['o38pf6tg52otihdco5cd9xrnu'],
                        createdAt: now,
                    },
                    {
                        id: 'a3ohjizc0umgrdjokq0tdt1o6',
                        name: 'idx_order_items_order_id',
                        unique: false,
                        fieldIds: ['8kg1r7v71fwebyobnb13d1olw'],
                        createdAt: now,
                    },
                    {
                        id: 'ceed7fa6dqaledgj3aahoq6zq',
                        name: 'idx_order_items_product_id',
                        unique: false,
                        fieldIds: ['fs0yfmtemll2heqy2s50yw5c7'],
                        createdAt: now,
                    },
                ],
                color: '#ff6363',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: '4jcdbncbbpz090s1oouwgyqda',
                name: 'categories',
                schema: 'public',
                x: 900,
                y: 600,
                fields: [
                    {
                        id: 'nk4db1593fq4n0b120c785fgg',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('categories_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: 'bofk3p6jzjq3v2tfahoxjgc3c',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '1kqkw9d8c92j4tl7677wid1a4',
                        name: 'description',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'm7rpny7luun8150rbe58348qt',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                    {
                        id: 'tn92uipekuwv6bw35f95j5tlc',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'tqelylf9sgn5ajfyuc1is0a4g',
                        name: 'categories_pkey',
                        unique: true,
                        fieldIds: ['nk4db1593fq4n0b120c785fgg'],
                        createdAt: now,
                    },
                    {
                        id: 'at2q4mestgsfs2hddm7rkrws5',
                        name: 'categories_name_key',
                        unique: true,
                        fieldIds: ['bofk3p6jzjq3v2tfahoxjgc3c'],
                        createdAt: now,
                    },
                ],
                color: '#ff9f74',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'agyk2idhaoy8dyg45at147euc',
                name: 'orders',
                schema: 'public',
                x: 100,
                y: 100,
                fields: [
                    {
                        id: 'ywq596jpuf4vcpyk1s57y6d6r',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('orders_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: 'pmowwl90lbuae0bufosnlsifl',
                        name: 'user_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'jeqqaipvch4kopaxxcbyn0vz9',
                        name: 'total_amount',
                        type: {
                            id: 'numeric',
                            name: 'numeric',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        precision: 10,
                        scale: 2,
                        createdAt: now,
                    },
                    {
                        id: 'z2bw31qz64tbl8jp4fy7jfp2d',
                        name: 'status',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '21mtp9ubbl1odglthlhrjvck8',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                    {
                        id: 'mss4szx2nsyspr27hx44udvva',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 't26y6yhpvsseflm06iy50e9i0',
                        name: 'idx_orders_user_id',
                        unique: false,
                        fieldIds: ['pmowwl90lbuae0bufosnlsifl'],
                        createdAt: now,
                    },
                    {
                        id: '7sq4oypoqdteczy4lvxmkwt85',
                        name: 'orders_pkey',
                        unique: true,
                        fieldIds: ['ywq596jpuf4vcpyk1s57y6d6r'],
                        createdAt: now,
                    },
                ],
                color: '#c05dcf',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'bhfwuo9udzmuj3l74vd7m48tk',
                name: 'invoices',
                schema: 'public',
                x: -300,
                y: 100.00000000000006,
                fields: [
                    {
                        id: '7fnrsvt25b0djgyz4axjdd0e5',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('invoices_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: 'uqnondfvf6ikoert875xfap6p',
                        name: 'order_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'eaxbl36o17xasghun3lusak0y',
                        name: 'amount',
                        type: {
                            id: 'numeric',
                            name: 'numeric',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        precision: 10,
                        scale: 2,
                        createdAt: now,
                    },
                    {
                        id: '8b0fqcel4xoh1mbj0em5zoizg',
                        name: 'issued_date',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '298hs14ies3lithvwn40z8u9e',
                        name: 'due_date',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'z93laiw56gvsk2jzmivhbsx05',
                        name: 'status',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'cx342rciyisx06km4t67k34wt',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                    {
                        id: '80pj4kxd9omqz47ickrde73oq',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'ifaidwas4lumagqo9rcheyptd',
                        name: 'idx_invoices_order_id',
                        unique: false,
                        fieldIds: ['uqnondfvf6ikoert875xfap6p'],
                        createdAt: now,
                    },
                    {
                        id: 'vtlwe879w98labyryar4wgpdd',
                        name: 'invoices_pkey',
                        unique: true,
                        fieldIds: ['7fnrsvt25b0djgyz4axjdd0e5'],
                        createdAt: now,
                    },
                ],
                color: '#c05dcf',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'e9fk12z5cth0v67ihyvvh2wqs',
                name: 'payments',
                schema: 'public',
                x: 99.99999999999991,
                y: -349.99999999999994,
                fields: [
                    {
                        id: 'abetxhfsaoskfijrjocieh2bg',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('payments_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: 'i744z40qaezt8fv1gzoqd2xjm',
                        name: 'invoice_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'xwpukemqfihwgx5uaazgkoder',
                        name: 'amount',
                        type: {
                            id: 'numeric',
                            name: 'numeric',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        precision: 10,
                        scale: 2,
                        createdAt: now,
                    },
                    {
                        id: '1wl8swsulvc2a4jhb6aj40v18',
                        name: 'payment_date',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'htgt2633t57rtcszu9rxqeagd',
                        name: 'method',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'zt93qzotnm8jjozqyh65sjvnv',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                    {
                        id: '7wq3crxkhi7u113ui9fm6tpbb',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'wm5judnzuxcl2btop4kk49rcp',
                        name: 'payments_pkey',
                        unique: true,
                        fieldIds: ['abetxhfsaoskfijrjocieh2bg'],
                        createdAt: now,
                    },
                    {
                        id: 'joagou3q0ra664cxolhag4xf3',
                        name: 'idx_payments_invoice_id',
                        unique: false,
                        fieldIds: ['i744z40qaezt8fv1gzoqd2xjm'],
                        createdAt: now,
                    },
                ],
                color: '#b067e9',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'o8d3pjo7mi4eppx1nix7pux7b',
                name: 'users',
                schema: 'public',
                x: 500,
                y: 100,
                fields: [
                    {
                        id: 'y9070o0w4k7d8uyfin3qqsmmh',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('users_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: 'mpmyjiwbadwphudrxslkd17eb',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '6bgqbzkp5znfecp5u0iqd95jr',
                        name: 'email',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'fogwzwh6z29y9zq7atgxogukm',
                        name: 'email_verified_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'malw8h55il8x1gvp4gntbrb8a',
                        name: 'password',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '4odfdpl8dsjhvz07x66b5n5gy',
                        name: 'remember_token',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'dvo53maaygny7w21fi8i1sl2n',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                    {
                        id: 'wp6z39ekai4bwxl5yxb9wyirc',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'dzujd361nktj62pn8ndbfi4hv',
                        name: 'idx_users_email',
                        unique: false,
                        fieldIds: ['6bgqbzkp5znfecp5u0iqd95jr'],
                        createdAt: now,
                    },
                    {
                        id: 'qnd3dzvv6dokstrh7gwhct58c',
                        name: 'users_email_key',
                        unique: true,
                        fieldIds: ['6bgqbzkp5znfecp5u0iqd95jr'],
                        createdAt: now,
                    },
                    {
                        id: 'solko3dmns6iwuj0qpgurf99l',
                        name: 'users_pkey',
                        unique: true,
                        fieldIds: ['y9070o0w4k7d8uyfin3qqsmmh'],
                        createdAt: now,
                    },
                ],
                color: '#8eb7ff',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'riz89ntbrrsngx4tebkwoyh7v',
                name: 'refunds',
                schema: 'public',
                x: 399.99999999999994,
                y: -400,
                fields: [
                    {
                        id: 'e76k774ho2glk15laqyp0ifch',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('refunds_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: '1b6qpw84to8kvxpbnzv1xzrrs',
                        name: 'order_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'r51o1tf819isxh92wxul6hthp',
                        name: 'amount',
                        type: {
                            id: 'numeric',
                            name: 'numeric',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        precision: 10,
                        scale: 2,
                        createdAt: now,
                    },
                    {
                        id: 'xqidmfazmb7ldl2eq6kpgg06n',
                        name: 'reason',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'yrga5clfuf9cktm5giw0iyqoa',
                        name: 'refunded_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'qnylx3n1kt9k5qr1syighhkgn',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                    {
                        id: 'szh4g6n5i15rgcen3d52htm6m',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'vie2cuwjzq3rxi5ql26ri8hrr',
                        name: 'refunds_pkey',
                        unique: true,
                        fieldIds: ['e76k774ho2glk15laqyp0ifch'],
                        createdAt: now,
                    },
                    {
                        id: 'k3wzw9hpm4mo9afbjxoysqhzy',
                        name: 'idx_refunds_order_id',
                        unique: false,
                        fieldIds: ['1b6qpw84to8kvxpbnzv1xzrrs'],
                        createdAt: now,
                    },
                ],
                color: '#ff6363',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'xobwd57cisx6xue5n2t9qxaag',
                name: 'products',
                schema: 'public',
                x: 500,
                y: 600,
                fields: [
                    {
                        id: 'u5qmau0su05fljgddx618kkby',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('products_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: 'xjh49a2j4niaqkekxtjcqdlfq',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'yoiz08coyfa49vjsy38p8gz7d',
                        name: 'category_id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'qu7xqfnhvio54tuwvluh4nt30',
                        name: 'price',
                        type: {
                            id: 'numeric',
                            name: 'numeric',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        precision: 10,
                        scale: 2,
                        createdAt: now,
                    },
                    {
                        id: '64pu5svvaakmyworks0phh3v6',
                        name: 'stock',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: '2lt1junq1sby4y06k9ua6svs7',
                        name: 'description',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'dudwkye6ngayrcbh1224psuxe',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                    {
                        id: 'l3s92sign79l7otcl6evl9o34',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_without_time_zone',
                            name: 'timestamp without time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        default: 'now()',
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'mlqz1el0jmbcm3x44rcpb5gp0',
                        name: 'idx_products_category_id',
                        unique: false,
                        fieldIds: ['yoiz08coyfa49vjsy38p8gz7d'],
                        createdAt: now,
                    },
                    {
                        id: '2ui0cjuzxvv96ienwpc50dgbe',
                        name: 'products_pkey',
                        unique: true,
                        fieldIds: ['u5qmau0su05fljgddx618kkby'],
                        createdAt: now,
                    },
                ],
                color: '#42e0c0',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
        ],
        relationships: [
            {
                id: '2uxubzp7ly7g829e4111d1zaj',
                name: 'orders_user_id_fkey',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'agyk2idhaoy8dyg45at147euc',
                targetTableId: 'o8d3pjo7mi4eppx1nix7pux7b',
                sourceFieldId: 'pmowwl90lbuae0bufosnlsifl',
                targetFieldId: 'y9070o0w4k7d8uyfin3qqsmmh',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '3jtipx5b1ak436bitwl218nbv',
                name: 'fk_category',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'xobwd57cisx6xue5n2t9qxaag',
                targetTableId: '4jcdbncbbpz090s1oouwgyqda',
                sourceFieldId: 'yoiz08coyfa49vjsy38p8gz7d',
                targetFieldId: 'nk4db1593fq4n0b120c785fgg',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: '6j9eqt3vpntr5hkk55cys2q14',
                name: 'fk_user',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'agyk2idhaoy8dyg45at147euc',
                targetTableId: 'o8d3pjo7mi4eppx1nix7pux7b',
                sourceFieldId: 'pmowwl90lbuae0bufosnlsifl',
                targetFieldId: 'y9070o0w4k7d8uyfin3qqsmmh',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'b7xbee90lql2o1j1zpcmsnkj4',
                name: 'order_items_product_id_fkey',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '3c97shz3xxm4j7v2mrdsc2ak3',
                targetTableId: 'xobwd57cisx6xue5n2t9qxaag',
                sourceFieldId: 'fs0yfmtemll2heqy2s50yw5c7',
                targetFieldId: 'u5qmau0su05fljgddx618kkby',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'bcswrpnqwx1r8kqni2jl8jf9w',
                name: 'fk_order_invoice',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'bhfwuo9udzmuj3l74vd7m48tk',
                targetTableId: 'agyk2idhaoy8dyg45at147euc',
                sourceFieldId: 'uqnondfvf6ikoert875xfap6p',
                targetFieldId: 'ywq596jpuf4vcpyk1s57y6d6r',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'dbhlhxouselw2a22uliy4ec6f',
                name: 'payments_invoice_id_fkey',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'e9fk12z5cth0v67ihyvvh2wqs',
                targetTableId: 'bhfwuo9udzmuj3l74vd7m48tk',
                sourceFieldId: 'i744z40qaezt8fv1gzoqd2xjm',
                targetFieldId: '7fnrsvt25b0djgyz4axjdd0e5',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'fpwyru7vhq0pwqrzxfv2mtgu8',
                name: 'order_items_order_id_fkey',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '3c97shz3xxm4j7v2mrdsc2ak3',
                targetTableId: 'agyk2idhaoy8dyg45at147euc',
                sourceFieldId: '8kg1r7v71fwebyobnb13d1olw',
                targetFieldId: 'ywq596jpuf4vcpyk1s57y6d6r',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'javg96z55bahagvlx48bjsgx5',
                name: 'refunds_order_id_fkey',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'riz89ntbrrsngx4tebkwoyh7v',
                targetTableId: 'agyk2idhaoy8dyg45at147euc',
                sourceFieldId: '1b6qpw84to8kvxpbnzv1xzrrs',
                targetFieldId: 'ywq596jpuf4vcpyk1s57y6d6r',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'oqzaizrpnfpa1z2oeb9yr0nnl',
                name: 'fk_order',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '3c97shz3xxm4j7v2mrdsc2ak3',
                targetTableId: 'agyk2idhaoy8dyg45at147euc',
                sourceFieldId: '8kg1r7v71fwebyobnb13d1olw',
                targetFieldId: 'ywq596jpuf4vcpyk1s57y6d6r',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'uqkhnjuulivpuqkjqummon6uu',
                name: 'products_category_id_fkey',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'xobwd57cisx6xue5n2t9qxaag',
                targetTableId: '4jcdbncbbpz090s1oouwgyqda',
                sourceFieldId: 'yoiz08coyfa49vjsy38p8gz7d',
                targetFieldId: 'nk4db1593fq4n0b120c785fgg',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'vqx6pil2jh35b8upswno1lkwr',
                name: 'fk_product',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: '3c97shz3xxm4j7v2mrdsc2ak3',
                targetTableId: 'xobwd57cisx6xue5n2t9qxaag',
                sourceFieldId: 'fs0yfmtemll2heqy2s50yw5c7',
                targetFieldId: 'u5qmau0su05fljgddx618kkby',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
            {
                id: 'zmmc607y3m6i69u6jqxct2a22',
                name: 'invoices_order_id_fkey',
                sourceSchema: 'public',
                targetSchema: 'public',
                sourceTableId: 'bhfwuo9udzmuj3l74vd7m48tk',
                targetTableId: 'agyk2idhaoy8dyg45at147euc',
                sourceFieldId: 'uqnondfvf6ikoert875xfap6p',
                targetFieldId: 'ywq596jpuf4vcpyk1s57y6d6r',
                sourceCardinality: 'many',
                targetCardinality: 'one',
                createdAt: now,
            },
        ],
        dependencies: [],
    },
};