diff --git a/src/assets/templates/adonis-acl-dark.png b/src/assets/templates/adonis-acl-dark.png new file mode 100644 index 00000000..a688b1e3 Binary files /dev/null and b/src/assets/templates/adonis-acl-dark.png differ diff --git a/src/assets/templates/adonis-acl.png b/src/assets/templates/adonis-acl.png new file mode 100644 index 00000000..eb23901d Binary files /dev/null and b/src/assets/templates/adonis-acl.png differ diff --git a/src/assets/templates/akaunting-dark.png b/src/assets/templates/akaunting-dark.png new file mode 100644 index 00000000..9d384322 Binary files /dev/null and b/src/assets/templates/akaunting-dark.png differ diff --git a/src/assets/templates/akaunting.png b/src/assets/templates/akaunting.png new file mode 100644 index 00000000..c8841dd3 Binary files /dev/null and b/src/assets/templates/akaunting.png differ diff --git a/src/assets/templates/django-db-dark.png b/src/assets/templates/django-db-dark.png new file mode 100644 index 00000000..ff53877e Binary files /dev/null and b/src/assets/templates/django-db-dark.png differ diff --git a/src/assets/templates/django-db.png b/src/assets/templates/django-db.png new file mode 100644 index 00000000..8d42e86c Binary files /dev/null and b/src/assets/templates/django-db.png differ diff --git a/src/assets/templates/laravel-db-dark.png b/src/assets/templates/laravel-db-dark.png new file mode 100644 index 00000000..f682430e Binary files /dev/null and b/src/assets/templates/laravel-db-dark.png differ diff --git a/src/assets/templates/laravel-db.png b/src/assets/templates/laravel-db.png new file mode 100644 index 00000000..7f58bace Binary files /dev/null and b/src/assets/templates/laravel-db.png differ diff --git a/src/assets/templates/twitter-db-dark.png b/src/assets/templates/twitter-db-dark.png new file mode 100644 index 00000000..670e29b5 Binary files /dev/null and b/src/assets/templates/twitter-db-dark.png differ diff --git a/src/assets/templates/twitter-db.png b/src/assets/templates/twitter-db.png new file mode 100644 index 00000000..6a747e9f Binary files /dev/null and b/src/assets/templates/twitter-db.png differ diff --git a/src/templates-data/templates-data.ts b/src/templates-data/templates-data.ts index ad48e216..cc6bcc20 100644 --- a/src/templates-data/templates-data.ts +++ b/src/templates-data/templates-data.ts @@ -4,6 +4,11 @@ import { visualNovelDb } from './templates/visual-novel-db'; import { airbnbDb } from './templates/airbnb-db'; import { wordpressDb } from './templates/wordpress-db'; import { pokemonDb } from './templates/pokemon-db'; +import { adonisAclDb } from './templates/adonis-acl-db'; +import { akauntingDb } from './templates/akaunting-db'; +import { djangoDb } from './templates/django-db'; +import { twitterDb } from './templates/twitter-db'; +import { laravelDb } from './templates/laravel-db'; export interface Template { slug: string; @@ -20,8 +25,13 @@ export interface Template { export const templates: Template[] = [ employeeDb, - visualNovelDb, + pokemonDb, airbnbDb, wordpressDb, - pokemonDb, + djangoDb, + laravelDb, + twitterDb, + visualNovelDb, + adonisAclDb, + akauntingDb, ]; diff --git a/src/templates-data/templates/adonis-acl-db.ts b/src/templates-data/templates/adonis-acl-db.ts new file mode 100644 index 00000000..1ba2ca66 --- /dev/null +++ b/src/templates-data/templates/adonis-acl-db.ts @@ -0,0 +1,667 @@ +import { DatabaseType } from '@/lib/domain/database-type'; +import type { Template } from '../templates-data'; +import image from '@/assets/templates/adonis-acl.png'; +import imageDark from '@/assets/templates/adonis-acl-dark.png'; + +export const adonisAclDb: Template = { + slug: 'adonis-acl-db', + name: 'Adonis Acl Database', + shortDescription: 'Role based permissions', + description: + 'Adonis ACL adds role based permissions to built in Auth System of Adonis Framework.', + image, + imageDark, + tags: ['Postgres', 'Open Source', 'Node.js'], + featured: true, + url: 'https://github.com/enniel/adonis-acl', + diagram: { + id: 'adonis_acl_db', + name: 'adonis-acl-db', + createdAt: new Date(), + updatedAt: new Date(), + databaseType: DatabaseType.POSTGRESQL, + tables: [ + { + id: '4tfy7o1t3ln1373iyxtzpz8t5', + name: 'permission_user', + schema: 'public', + x: 441.0506024096385, + y: -94.22037476830401, + fields: [ + { + id: 'kx4al18p0mzdkcnr1lpo6h75n', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('permission_user_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'zjbpw5umqxilj7urdfmbsc3oy', + name: 'permission_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'inmxxha9vdpnfeupr788gwfw1', + name: 'user_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'vimawd57a8ft226yznzhts8gh', + name: 'created_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '2fzwubtg6tkpglg9rvej86k73', + name: 'updated_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '1usshdeu8pbxa3l4itt814ldc', + name: 'permission_user_permission_id_user_id_key', + unique: true, + fieldIds: [ + 'zjbpw5umqxilj7urdfmbsc3oy', + 'inmxxha9vdpnfeupr788gwfw1', + ], + createdAt: Date.now(), + }, + { + id: 'o4zsinm8juyrgd318f7thopu2', + name: 'idx_permission_user_permission_id', + unique: false, + fieldIds: ['zjbpw5umqxilj7urdfmbsc3oy'], + createdAt: Date.now(), + }, + { + id: 'oq2qxxzd2n8mphs4lh7jyzjxk', + name: 'idx_permission_user_user_id', + unique: false, + fieldIds: ['inmxxha9vdpnfeupr788gwfw1'], + createdAt: Date.now(), + }, + { + id: 'i60fxthzz9o372y4tbhb5cuhm', + name: 'permission_user_pkey', + unique: true, + fieldIds: ['kx4al18p0mzdkcnr1lpo6h75n'], + createdAt: Date.now(), + }, + ], + color: '#4dee8a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: '6v24e5bdz4vi9e757spbcea6d', + name: 'role_user', + schema: 'public', + x: 374.94791473586656, + y: 337.7814643188136, + fields: [ + { + id: 'vaaupx4bcejm1kqx4jze9wytx', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('role_user_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: '29dylthvlf2v5vh41dp1kyxbr', + name: 'role_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'g4i6e70u835inwwcjs9tdiwpf', + name: 'user_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '3tfwqm0igug2j0vm6sv6nt6i5', + name: 'created_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'ho7doyax6cr77qpvsboz6jymz', + name: 'updated_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '7ngkqnaew4m8h3ejoxdercox1', + name: 'role_user_pkey', + unique: true, + fieldIds: ['vaaupx4bcejm1kqx4jze9wytx'], + createdAt: Date.now(), + }, + { + id: 'dz3poedtl3z6wkwanxgv98zxi', + name: 'role_user_role_id_user_id_key', + unique: true, + fieldIds: [ + '29dylthvlf2v5vh41dp1kyxbr', + 'g4i6e70u835inwwcjs9tdiwpf', + ], + createdAt: Date.now(), + }, + { + id: 'l8j5np655am15rgrfja4qzpdt', + name: 'idx_role_user_user_id', + unique: false, + fieldIds: ['g4i6e70u835inwwcjs9tdiwpf'], + createdAt: Date.now(), + }, + { + id: 'ie7wixunsiwfzp8udcpxmsj7p', + name: 'idx_role_user_role_id', + unique: false, + fieldIds: ['29dylthvlf2v5vh41dp1kyxbr'], + createdAt: Date.now(), + }, + ], + color: '#ffe374', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'i298i343vjq652fdswhwaysr7', + name: 'users', + schema: 'public', + x: 90.5794253938833, + y: 140.8111214087117, + fields: [ + { + id: 'zs7cvtl01rtle7xts2mwqavg3', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('users_id_seq'::regclass)", + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'vxdig4dza0x7d7k70a8k6m7ap', + name: 'users_pkey', + unique: true, + fieldIds: ['zs7cvtl01rtle7xts2mwqavg3'], + createdAt: Date.now(), + }, + ], + color: '#8a61f5', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'mueqxc4u5k58cz26hqu1ku7sx', + name: 'permission_role', + schema: 'public', + x: 1283.7775718257649, + y: 56.92159406858201, + fields: [ + { + id: '8s76u8u0ivylxlhhya7geg3t7', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('permission_role_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'jkyfn71uasmxjj22bsxxug6wb', + name: 'permission_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'i1y14qiro8bqu0nhaj4quyd9p', + name: 'role_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 's86pfp5iewn9mwci4m75oro0j', + name: 'created_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'v10o7negcp8tliaiie8iste38', + name: 'updated_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '4uhhvnt29q91z55tfpr1uib38', + name: 'permission_role_permission_id_role_id_key', + unique: true, + fieldIds: [ + 'jkyfn71uasmxjj22bsxxug6wb', + 'i1y14qiro8bqu0nhaj4quyd9p', + ], + createdAt: Date.now(), + }, + { + id: '8o6apfea6ifduymoxd0teibi0', + name: 'idx_permission_role_role_id', + unique: false, + fieldIds: ['i1y14qiro8bqu0nhaj4quyd9p'], + createdAt: Date.now(), + }, + { + id: 'lahuo79xsq2brj2dni67hpip1', + name: 'idx_permission_role_permission_id', + unique: false, + fieldIds: ['jkyfn71uasmxjj22bsxxug6wb'], + createdAt: Date.now(), + }, + { + id: '6hqnbyj0uzzxulurr56uak38x', + name: 'permission_role_pkey', + unique: true, + fieldIds: ['8s76u8u0ivylxlhhya7geg3t7'], + createdAt: Date.now(), + }, + ], + color: '#8eb7ff', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 't6c4vthncqe0gxza814wuzcjl', + name: 'permissions', + schema: 'public', + x: 877.67859128823, + y: -156.20315106580168, + fields: [ + { + id: 'iywp08732p9q7pltm6pqqmmk6', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('permissions_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'z9p6x72tx45bfv0iwq64jfobp', + name: 'slug', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'ipix7t0lz3pn78leic3s9xrjy', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'kli69miojwm6e0hseacy8o5hy', + name: 'description', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'wjd77kdm6ecdythpwarpvu658', + name: 'created_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'h4ir4c21y2uibomt5twrdcqgi', + name: 'updated_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '7wofvazg9gu4z15gazvnu29d2', + name: 'permissions_pkey', + unique: true, + fieldIds: ['iywp08732p9q7pltm6pqqmmk6'], + createdAt: Date.now(), + }, + { + id: 'upxsqobs4g597kbbpfmyqnnkh', + name: 'permissions_slug_key', + unique: true, + fieldIds: ['z9p6x72tx45bfv0iwq64jfobp'], + createdAt: Date.now(), + }, + ], + color: '#b067e9', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'wigyqmreqg7oo1361a4v4tf1o', + name: 'roles', + schema: 'public', + x: 837.7233549582947, + y: 272.313623725672, + fields: [ + { + id: 'bz9n3ntxo22bb7mu9t9wwv67x', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('roles_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'wmrytzy38hipx342qjznsy8zx', + name: 'slug', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'hk3g5yid08iozkvooc4htuabs', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'h0gp2hi6nf14dlw0wo14h1gyn', + name: 'description', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'd2kwx6qx2cd7epm7m5pikp718', + name: 'created_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'xq1udcys21dn8rwn6vatyy47a', + name: 'updated_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'ngrpk9ugw0en5ej20jst3fdj2', + name: 'roles_pkey', + unique: true, + fieldIds: ['bz9n3ntxo22bb7mu9t9wwv67x'], + createdAt: Date.now(), + }, + { + id: '4od6wsi5v258oflij1uw3d43b', + name: 'roles_slug_key', + unique: true, + fieldIds: ['wmrytzy38hipx342qjznsy8zx'], + createdAt: Date.now(), + }, + ], + color: '#ff6363', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + ], + relationships: [ + { + id: '47fwpcozxyz27e30pm1ib56zm', + name: 'permission_user_user_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '4tfy7o1t3ln1373iyxtzpz8t5', + targetTableId: 'i298i343vjq652fdswhwaysr7', + sourceFieldId: 'inmxxha9vdpnfeupr788gwfw1', + targetFieldId: 'zs7cvtl01rtle7xts2mwqavg3', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: '9s8jc4cycjn9ql94ncqjzrbec', + name: 'permission_user_permission_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '4tfy7o1t3ln1373iyxtzpz8t5', + targetTableId: 't6c4vthncqe0gxza814wuzcjl', + sourceFieldId: 'zjbpw5umqxilj7urdfmbsc3oy', + targetFieldId: 'iywp08732p9q7pltm6pqqmmk6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'dmxvyh7b90codoe0aosraa94h', + name: 'role_user_user_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '6v24e5bdz4vi9e757spbcea6d', + targetTableId: 'i298i343vjq652fdswhwaysr7', + sourceFieldId: 'g4i6e70u835inwwcjs9tdiwpf', + targetFieldId: 'zs7cvtl01rtle7xts2mwqavg3', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'f0t9gyglmjmnd5apytli0p9ip', + name: 'role_user_role_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '6v24e5bdz4vi9e757spbcea6d', + targetTableId: 'wigyqmreqg7oo1361a4v4tf1o', + sourceFieldId: '29dylthvlf2v5vh41dp1kyxbr', + targetFieldId: 'bz9n3ntxo22bb7mu9t9wwv67x', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'hpvk9671hn872b3zr4p5fkisr', + name: 'permission_role_role_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'mueqxc4u5k58cz26hqu1ku7sx', + targetTableId: 'wigyqmreqg7oo1361a4v4tf1o', + sourceFieldId: 'i1y14qiro8bqu0nhaj4quyd9p', + targetFieldId: 'bz9n3ntxo22bb7mu9t9wwv67x', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'lvv365mewcakaozzmwv8qo78c', + name: 'permission_role_permission_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'mueqxc4u5k58cz26hqu1ku7sx', + targetTableId: 't6c4vthncqe0gxza814wuzcjl', + sourceFieldId: 'jkyfn71uasmxjj22bsxxug6wb', + targetFieldId: 'iywp08732p9q7pltm6pqqmmk6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + ], + dependencies: [], + }, +}; diff --git a/src/templates-data/templates/airbnb-db.ts b/src/templates-data/templates/airbnb-db.ts index 130769df..7040a7d6 100644 --- a/src/templates-data/templates/airbnb-db.ts +++ b/src/templates-data/templates/airbnb-db.ts @@ -10,7 +10,7 @@ export const airbnbDb: Template = { description: 'Example database schema diagram for Airbnb', image, imageDark, - tags: ['postgres', 'example apps'], + tags: ['Postgres', 'Example Apps'], featured: true, diagram: { id: 'airbnb_db', diff --git a/src/templates-data/templates/akaunting-db.ts b/src/templates-data/templates/akaunting-db.ts new file mode 100644 index 00000000..bcc14d5b --- /dev/null +++ b/src/templates-data/templates/akaunting-db.ts @@ -0,0 +1,1138 @@ +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'; + +export const akauntingDb: Template = { + slug: 'akaunting-db', + 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: true, + url: 'https://github.com/akaunting/akaunting', + diagram: { + id: 'akaunting_db', + name: 'akaunting-db', + 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: Date.now(), + }, + { + id: '8kg1r7v71fwebyobnb13d1olw', + name: 'order_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'fs0yfmtemll2heqy2s50yw5c7', + name: 'product_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '03h16qxipz1aiuc2oiprgxs0n', + name: 'quantity', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'kim267xkk5d9a0lodcb6c40yq', + name: 'price', + type: { + id: 'numeric', + name: 'numeric', + }, + primaryKey: false, + unique: false, + nullable: false, + precision: 10, + scale: 2, + createdAt: Date.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: Date.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: Date.now(), + }, + ], + indexes: [ + { + id: '6c3z6qnpl7qw3s6zf4r7z6pqk', + name: 'order_items_pkey', + unique: true, + fieldIds: ['o38pf6tg52otihdco5cd9xrnu'], + createdAt: Date.now(), + }, + { + id: 'a3ohjizc0umgrdjokq0tdt1o6', + name: 'idx_order_items_order_id', + unique: false, + fieldIds: ['8kg1r7v71fwebyobnb13d1olw'], + createdAt: Date.now(), + }, + { + id: 'ceed7fa6dqaledgj3aahoq6zq', + name: 'idx_order_items_product_id', + unique: false, + fieldIds: ['fs0yfmtemll2heqy2s50yw5c7'], + createdAt: Date.now(), + }, + ], + color: '#ff6363', + isView: false, + isMaterializedView: false, + createdAt: Date.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: Date.now(), + }, + { + id: 'bofk3p6jzjq3v2tfahoxjgc3c', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + { + id: '1kqkw9d8c92j4tl7677wid1a4', + name: 'description', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.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: Date.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: Date.now(), + }, + ], + indexes: [ + { + id: 'tqelylf9sgn5ajfyuc1is0a4g', + name: 'categories_pkey', + unique: true, + fieldIds: ['nk4db1593fq4n0b120c785fgg'], + createdAt: Date.now(), + }, + { + id: 'at2q4mestgsfs2hddm7rkrws5', + name: 'categories_name_key', + unique: true, + fieldIds: ['bofk3p6jzjq3v2tfahoxjgc3c'], + createdAt: Date.now(), + }, + ], + color: '#ff9f74', + isView: false, + isMaterializedView: false, + createdAt: Date.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: Date.now(), + }, + { + id: 'pmowwl90lbuae0bufosnlsifl', + name: 'user_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'jeqqaipvch4kopaxxcbyn0vz9', + name: 'total_amount', + type: { + id: 'numeric', + name: 'numeric', + }, + primaryKey: false, + unique: false, + nullable: false, + precision: 10, + scale: 2, + createdAt: Date.now(), + }, + { + id: 'z2bw31qz64tbl8jp4fy7jfp2d', + name: 'status', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.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: Date.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: Date.now(), + }, + ], + indexes: [ + { + id: 't26y6yhpvsseflm06iy50e9i0', + name: 'idx_orders_user_id', + unique: false, + fieldIds: ['pmowwl90lbuae0bufosnlsifl'], + createdAt: Date.now(), + }, + { + id: '7sq4oypoqdteczy4lvxmkwt85', + name: 'orders_pkey', + unique: true, + fieldIds: ['ywq596jpuf4vcpyk1s57y6d6r'], + createdAt: Date.now(), + }, + ], + color: '#c05dcf', + isView: false, + isMaterializedView: false, + createdAt: Date.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: Date.now(), + }, + { + id: 'uqnondfvf6ikoert875xfap6p', + name: 'order_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'eaxbl36o17xasghun3lusak0y', + name: 'amount', + type: { + id: 'numeric', + name: 'numeric', + }, + primaryKey: false, + unique: false, + nullable: false, + precision: 10, + scale: 2, + createdAt: Date.now(), + }, + { + id: '8b0fqcel4xoh1mbj0em5zoizg', + name: 'issued_date', + type: { + id: 'timestamp_without_time_zone', + name: 'timestamp without time zone', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '298hs14ies3lithvwn40z8u9e', + name: 'due_date', + type: { + id: 'timestamp_without_time_zone', + name: 'timestamp without time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'z93laiw56gvsk2jzmivhbsx05', + name: 'status', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.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: Date.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: Date.now(), + }, + ], + indexes: [ + { + id: 'ifaidwas4lumagqo9rcheyptd', + name: 'idx_invoices_order_id', + unique: false, + fieldIds: ['uqnondfvf6ikoert875xfap6p'], + createdAt: Date.now(), + }, + { + id: 'vtlwe879w98labyryar4wgpdd', + name: 'invoices_pkey', + unique: true, + fieldIds: ['7fnrsvt25b0djgyz4axjdd0e5'], + createdAt: Date.now(), + }, + ], + color: '#c05dcf', + isView: false, + isMaterializedView: false, + createdAt: Date.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: Date.now(), + }, + { + id: 'i744z40qaezt8fv1gzoqd2xjm', + name: 'invoice_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'xwpukemqfihwgx5uaazgkoder', + name: 'amount', + type: { + id: 'numeric', + name: 'numeric', + }, + primaryKey: false, + unique: false, + nullable: false, + precision: 10, + scale: 2, + createdAt: Date.now(), + }, + { + id: '1wl8swsulvc2a4jhb6aj40v18', + name: 'payment_date', + type: { + id: 'timestamp_without_time_zone', + name: 'timestamp without time zone', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'htgt2633t57rtcszu9rxqeagd', + name: 'method', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.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: Date.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: Date.now(), + }, + ], + indexes: [ + { + id: 'wm5judnzuxcl2btop4kk49rcp', + name: 'payments_pkey', + unique: true, + fieldIds: ['abetxhfsaoskfijrjocieh2bg'], + createdAt: Date.now(), + }, + { + id: 'joagou3q0ra664cxolhag4xf3', + name: 'idx_payments_invoice_id', + unique: false, + fieldIds: ['i744z40qaezt8fv1gzoqd2xjm'], + createdAt: Date.now(), + }, + ], + color: '#b067e9', + isView: false, + isMaterializedView: false, + createdAt: Date.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: Date.now(), + }, + { + id: 'mpmyjiwbadwphudrxslkd17eb', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '6bgqbzkp5znfecp5u0iqd95jr', + name: 'email', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.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: Date.now(), + }, + { + id: 'malw8h55il8x1gvp4gntbrb8a', + name: 'password', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '4odfdpl8dsjhvz07x66b5n5gy', + name: 'remember_token', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.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: Date.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: Date.now(), + }, + ], + indexes: [ + { + id: 'dzujd361nktj62pn8ndbfi4hv', + name: 'idx_users_email', + unique: false, + fieldIds: ['6bgqbzkp5znfecp5u0iqd95jr'], + createdAt: Date.now(), + }, + { + id: 'qnd3dzvv6dokstrh7gwhct58c', + name: 'users_email_key', + unique: true, + fieldIds: ['6bgqbzkp5znfecp5u0iqd95jr'], + createdAt: Date.now(), + }, + { + id: 'solko3dmns6iwuj0qpgurf99l', + name: 'users_pkey', + unique: true, + fieldIds: ['y9070o0w4k7d8uyfin3qqsmmh'], + createdAt: Date.now(), + }, + ], + color: '#8eb7ff', + isView: false, + isMaterializedView: false, + createdAt: Date.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: Date.now(), + }, + { + id: '1b6qpw84to8kvxpbnzv1xzrrs', + name: 'order_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'r51o1tf819isxh92wxul6hthp', + name: 'amount', + type: { + id: 'numeric', + name: 'numeric', + }, + primaryKey: false, + unique: false, + nullable: false, + precision: 10, + scale: 2, + createdAt: Date.now(), + }, + { + id: 'xqidmfazmb7ldl2eq6kpgg06n', + name: 'reason', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'yrga5clfuf9cktm5giw0iyqoa', + name: 'refunded_at', + type: { + id: 'timestamp_without_time_zone', + name: 'timestamp without time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.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: Date.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: Date.now(), + }, + ], + indexes: [ + { + id: 'vie2cuwjzq3rxi5ql26ri8hrr', + name: 'refunds_pkey', + unique: true, + fieldIds: ['e76k774ho2glk15laqyp0ifch'], + createdAt: Date.now(), + }, + { + id: 'k3wzw9hpm4mo9afbjxoysqhzy', + name: 'idx_refunds_order_id', + unique: false, + fieldIds: ['1b6qpw84to8kvxpbnzv1xzrrs'], + createdAt: Date.now(), + }, + ], + color: '#ff6363', + isView: false, + isMaterializedView: false, + createdAt: Date.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: Date.now(), + }, + { + id: 'xjh49a2j4niaqkekxtjcqdlfq', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'yoiz08coyfa49vjsy38p8gz7d', + name: 'category_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'qu7xqfnhvio54tuwvluh4nt30', + name: 'price', + type: { + id: 'numeric', + name: 'numeric', + }, + primaryKey: false, + unique: false, + nullable: false, + precision: 10, + scale: 2, + createdAt: Date.now(), + }, + { + id: '64pu5svvaakmyworks0phh3v6', + name: 'stock', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '2lt1junq1sby4y06k9ua6svs7', + name: 'description', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.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: Date.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: Date.now(), + }, + ], + indexes: [ + { + id: 'mlqz1el0jmbcm3x44rcpb5gp0', + name: 'idx_products_category_id', + unique: false, + fieldIds: ['yoiz08coyfa49vjsy38p8gz7d'], + createdAt: Date.now(), + }, + { + id: '2ui0cjuzxvv96ienwpc50dgbe', + name: 'products_pkey', + unique: true, + fieldIds: ['u5qmau0su05fljgddx618kkby'], + createdAt: Date.now(), + }, + ], + color: '#42e0c0', + isView: false, + isMaterializedView: false, + createdAt: Date.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: Date.now(), + }, + { + id: '3jtipx5b1ak436bitwl218nbv', + name: 'fk_category', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'xobwd57cisx6xue5n2t9qxaag', + targetTableId: '4jcdbncbbpz090s1oouwgyqda', + sourceFieldId: 'yoiz08coyfa49vjsy38p8gz7d', + targetFieldId: 'nk4db1593fq4n0b120c785fgg', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: '6j9eqt3vpntr5hkk55cys2q14', + name: 'fk_user', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'agyk2idhaoy8dyg45at147euc', + targetTableId: 'o8d3pjo7mi4eppx1nix7pux7b', + sourceFieldId: 'pmowwl90lbuae0bufosnlsifl', + targetFieldId: 'y9070o0w4k7d8uyfin3qqsmmh', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.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: Date.now(), + }, + { + id: 'bcswrpnqwx1r8kqni2jl8jf9w', + name: 'fk_order_invoice', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'bhfwuo9udzmuj3l74vd7m48tk', + targetTableId: 'agyk2idhaoy8dyg45at147euc', + sourceFieldId: 'uqnondfvf6ikoert875xfap6p', + targetFieldId: 'ywq596jpuf4vcpyk1s57y6d6r', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.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: Date.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: Date.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: Date.now(), + }, + { + id: 'oqzaizrpnfpa1z2oeb9yr0nnl', + name: 'fk_order', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '3c97shz3xxm4j7v2mrdsc2ak3', + targetTableId: 'agyk2idhaoy8dyg45at147euc', + sourceFieldId: '8kg1r7v71fwebyobnb13d1olw', + targetFieldId: 'ywq596jpuf4vcpyk1s57y6d6r', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.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: Date.now(), + }, + { + id: 'vqx6pil2jh35b8upswno1lkwr', + name: 'fk_product', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '3c97shz3xxm4j7v2mrdsc2ak3', + targetTableId: 'xobwd57cisx6xue5n2t9qxaag', + sourceFieldId: 'fs0yfmtemll2heqy2s50yw5c7', + targetFieldId: 'u5qmau0su05fljgddx618kkby', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.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: Date.now(), + }, + ], + dependencies: [], + }, +}; diff --git a/src/templates-data/templates/django-db.ts b/src/templates-data/templates/django-db.ts new file mode 100644 index 00000000..5a29f7bf --- /dev/null +++ b/src/templates-data/templates/django-db.ts @@ -0,0 +1,1047 @@ +import { DatabaseType } from '@/lib/domain/database-type'; +import type { Template } from '../templates-data'; +import image from '@/assets/templates/django-db.png'; +import imageDark from '@/assets/templates/django-db-dark.png'; + +export const djangoDb: Template = { + slug: 'django-db', + name: 'Django', + shortDescription: 'High-level Python web framework', + description: + 'For rapid, clean web app development, with tools, migrations, and database tables', + image, + imageDark, + tags: ['Postgres', 'Open Source', 'Django', 'Python'], + featured: true, + url: 'https://github.com/django/django', + diagram: { + id: 'django_db', + name: 'django-db', + createdAt: new Date(), + updatedAt: new Date(), + databaseType: DatabaseType.POSTGRESQL, + tables: [ + { + id: '0mwj7i78bohux3lamc5xeer9s', + name: 'django_content_type', + schema: 'public', + x: 691.6464135518331, + y: 281.2965038885413, + fields: [ + { + id: 'aaswqtx7y5enj158iecrsvxv1', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: + "nextval('django_content_type_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: '5gtjppltnsygv1yee34q7lizp', + name: 'app_label', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '0pffgfuuaosjc9kpwnxuat4pv', + name: 'model', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '8yw9chz65l9e0djd3cyjg95b4', + name: 'idx_django_content_type_app_label_model', + unique: false, + fieldIds: [ + '5gtjppltnsygv1yee34q7lizp', + '0pffgfuuaosjc9kpwnxuat4pv', + ], + createdAt: Date.now(), + }, + { + id: 'nc0iqhp6nvac5gr7kit3cb1ug', + name: 'django_content_type_app_label_model_key', + unique: true, + fieldIds: [ + '5gtjppltnsygv1yee34q7lizp', + '0pffgfuuaosjc9kpwnxuat4pv', + ], + createdAt: Date.now(), + }, + { + id: 'z3ykfz97ufe68l46585r7rh08', + name: 'django_content_type_pkey', + unique: true, + fieldIds: ['aaswqtx7y5enj158iecrsvxv1'], + createdAt: Date.now(), + }, + ], + color: '#42e0c0', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: '0sqcjqp0wh42ptj8ltj9shw5m', + name: 'auth_user_user_permissions', + schema: 'public', + x: 969.9324055268842, + y: 67.88127906241971, + fields: [ + { + id: '48hayinn1vpg0npcbwrnhju02', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: + "nextval('auth_user_user_permissions_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: '4ywckubg6r1nuyovtxai77g8x', + name: 'user_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '5fajzfjhgsf95siv43r3dhr9z', + name: 'permission_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'y9vmo108tmagq4oew1el9yxmi', + name: 'auth_user_user_permissions_pkey', + unique: true, + fieldIds: ['48hayinn1vpg0npcbwrnhju02'], + createdAt: Date.now(), + }, + { + id: 'tdjmqah44786blfdyffpve0yx', + name: 'idx_auth_user_user_permissions_user_id', + unique: false, + fieldIds: ['4ywckubg6r1nuyovtxai77g8x'], + createdAt: Date.now(), + }, + { + id: 't4fn8vcwr3fjk8vd7kjjf8xe2', + name: 'auth_user_user_permissions_user_id_permission_id_key', + unique: true, + fieldIds: [ + '4ywckubg6r1nuyovtxai77g8x', + '5fajzfjhgsf95siv43r3dhr9z', + ], + createdAt: Date.now(), + }, + { + id: 'd0rsyfk7qr34wdw5hqkhy7gs4', + name: 'idx_auth_user_user_permissions_permission_id', + unique: false, + fieldIds: ['5fajzfjhgsf95siv43r3dhr9z'], + createdAt: Date.now(), + }, + ], + color: '#42e0c0', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: '6ijscya6hovxhx0q7dsq5lgba', + name: 'auth_permission', + schema: 'public', + x: 100, + y: 100, + fields: [ + { + id: 'leg6ngcahmqkrqbq5qnyw6o9c', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('auth_permission_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'o3mmof3mhmjc99fyxijlrhjoj', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '23lkh2kce9zuj24n73hl9kjfk', + name: 'content_type_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'bh9megq4qjnu5483xdw1kkloy', + name: 'codename', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'rwnp76au1aezon00ch719t8zm', + name: 'idx_auth_permission_content_type_id_codename', + unique: false, + fieldIds: [ + '23lkh2kce9zuj24n73hl9kjfk', + 'bh9megq4qjnu5483xdw1kkloy', + ], + createdAt: Date.now(), + }, + { + id: 'zn35qhbfbiwwtyyz34y6994kq', + name: 'auth_permission_content_type_id_codename_key', + unique: true, + fieldIds: [ + '23lkh2kce9zuj24n73hl9kjfk', + 'bh9megq4qjnu5483xdw1kkloy', + ], + createdAt: Date.now(), + }, + { + id: 'ox6twypyhwpk5zyvhxxr8frn9', + name: 'auth_permission_pkey', + unique: true, + fieldIds: ['leg6ngcahmqkrqbq5qnyw6o9c'], + createdAt: Date.now(), + }, + ], + color: '#b067e9', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'aj90tn5zdut2i9wchf2g054u6', + name: 'django_session', + schema: 'public', + x: 498.1175315856394, + y: 464.6575256259596, + fields: [ + { + id: 'pgkj2amki1b2mqtsd9c0nnd1u', + name: 'session_key', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: true, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'j2ztu8l6rkjlxsx76ykp2ib8u', + name: 'session_data', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'ymr32udk6isv8qp1tsl92citq', + name: 'expire_date', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'u7uqsqrmxk8ivcy7ud3qkt96s', + name: 'django_session_pkey', + unique: true, + fieldIds: ['pgkj2amki1b2mqtsd9c0nnd1u'], + createdAt: Date.now(), + }, + ], + color: '#ff9f74', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'bq198nmyhwfzh6a1fkg7b2vw7', + name: 'django_migrations', + schema: 'public', + x: 204.74159188690328, + y: 468.76961766614477, + fields: [ + { + id: '0t7dddvyf9ck4hkdj62eypuab', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: + "nextval('django_migrations_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'e5eec3s5p1mn1m3xou4p666f5', + name: 'app', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 's0dktocfk76dgsxtmxboy5sl9', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'wskoltcxjd11q2vriagunj6dk', + name: 'applied', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'xlu6psjbppdhy6lsvuk1kwclr', + name: 'django_migrations_pkey', + unique: true, + fieldIds: ['0t7dddvyf9ck4hkdj62eypuab'], + createdAt: Date.now(), + }, + ], + color: '#8a61f5', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'ezfuiy69q3e1n0snzgci2aotf', + name: 'auth_group', + schema: 'public', + x: 889.6198761279297, + y: -150.25737909009885, + fields: [ + { + id: 'ezeknuboplfry5sbpiji8autf', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('auth_group_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'ea0kvqh2x6qpd4gzes5npsja6', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'gubuzayp4ie7v1flnio36sv1b', + name: 'auth_group_pkey', + unique: true, + fieldIds: ['ezeknuboplfry5sbpiji8autf'], + createdAt: Date.now(), + }, + { + id: 'n4co9vid9w8p763a3li9psjte', + name: 'auth_group_name_key', + unique: true, + fieldIds: ['ea0kvqh2x6qpd4gzes5npsja6'], + createdAt: Date.now(), + }, + ], + color: '#b067e9', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'gp2tb8rtocqnpyrogbk72ti4e', + name: 'django_admin_log', + schema: 'public', + x: 1074.4346504983594, + y: 363.39439464701354, + fields: [ + { + id: 'divj1daariu3ockoff7tfwghj', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('django_admin_log_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: '3mztc0xvt0fbogx7a91s23vp4', + name: 'action_time', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'ool75ur2ztqwxk10emn3vy5z2', + name: 'object_id', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'zni78ipli4c537c93erb7wjt5', + name: 'object_repr', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'vd8uhrjztnob8ytlyrl7q3yq7', + name: 'action_flag', + type: { + id: 'smallint', + name: 'smallint', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'kuvjqo6h4orgyz0fytp2l3dsk', + name: 'change_message', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'm2bkd2omwo9cs94k7856vv2eo', + name: 'user_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '8ybk1fb6ce3v3fbaoh9sdrvno', + name: 'content_type_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '02etetkil34hidzu2dlsyd0tc', + name: 'idx_django_admin_log_user_id', + unique: false, + fieldIds: ['m2bkd2omwo9cs94k7856vv2eo'], + createdAt: Date.now(), + }, + { + id: '2sb8sgefsg0ytsd0y60ferwyu', + name: 'django_admin_log_pkey', + unique: true, + fieldIds: ['divj1daariu3ockoff7tfwghj'], + createdAt: Date.now(), + }, + { + id: 'bnrbxn8j6g3ogueq6lwcs2cc3', + name: 'idx_django_admin_log_content_type_id', + unique: false, + fieldIds: ['8ybk1fb6ce3v3fbaoh9sdrvno'], + createdAt: Date.now(), + }, + ], + color: '#9ef07a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'srvnwsww376kltu4bqcaix74j', + name: 'auth_user', + schema: 'public', + x: 1568.9215940685822, + y: 394.2576459684892, + fields: [ + { + id: 'n85uz79bjbt8c2o8pldag3rrr', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('auth_user_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'p7wmxev1ei04rfvx0fiuyi6jo', + name: 'password', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'h09pzea3qllvhhvh1isma40ev', + name: 'last_login', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'pv5lp8upk6lpe12bygngewu1f', + name: 'is_superuser', + type: { + id: 'smallint', + name: 'smallint', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'r8thbfqjvlanga12s21mlcer4', + name: 'username', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'dwg2tna0dklz7yvsxf9qohgvt', + name: 'first_name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 't96k3jjdd4b5cfl2mg48idr5r', + name: 'last_name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'lqrx9tm94xh6gqychm530g8j5', + name: 'email', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '3y4rf05ctzdih9lif4pqe5ouu', + name: 'is_staff', + type: { + id: 'smallint', + name: 'smallint', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'd7kize8181ek72yqgg8401x98', + name: 'is_active', + type: { + id: 'smallint', + name: 'smallint', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'zu279l5v45mjm3lb54jf3y8kw', + name: 'date_joined', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '4c4q2516wmq77s24o7uvysb6p', + name: 'auth_user_username_key', + unique: true, + fieldIds: ['r8thbfqjvlanga12s21mlcer4'], + createdAt: Date.now(), + }, + { + id: 'm38rq1kj7iik25w2qkveyotcd', + name: 'auth_user_pkey', + unique: true, + fieldIds: ['n85uz79bjbt8c2o8pldag3rrr'], + createdAt: Date.now(), + }, + ], + color: '#ffe374', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'vsbckzn4y71ye7whfi5sw1o8t', + name: 'auth_user_groups', + schema: 'public', + x: 1275.9243744207602, + y: -114.0055607043559, + fields: [ + { + id: '9f5vlf6678ppx46woqpsgbo8u', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('auth_user_groups_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'wte5c7eqpnh6614c64gmc8h56', + name: 'user_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'g3afeo3sq0l3f2h5lcrajkowm', + name: 'group_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'ma7z948nuywxqolen11b50jwh', + name: 'auth_user_groups_user_id_group_id_key', + unique: true, + fieldIds: [ + 'wte5c7eqpnh6614c64gmc8h56', + 'g3afeo3sq0l3f2h5lcrajkowm', + ], + createdAt: Date.now(), + }, + { + id: '3s0v03e0dux5dxx6664iebalq', + name: 'idx_auth_user_groups_user_id', + unique: false, + fieldIds: ['wte5c7eqpnh6614c64gmc8h56'], + createdAt: Date.now(), + }, + { + id: 'mx4qb2szbjrg8b0vrif85462y', + name: 'auth_user_groups_pkey', + unique: true, + fieldIds: ['9f5vlf6678ppx46woqpsgbo8u'], + createdAt: Date.now(), + }, + { + id: '74l3ciypq3xftihxvqykqntzn', + name: 'idx_auth_user_groups_group_id', + unique: false, + fieldIds: ['g3afeo3sq0l3f2h5lcrajkowm'], + createdAt: Date.now(), + }, + ], + color: '#ff6363', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'xvzbm8lrq4nl7lfk5zugumn2n', + name: 'auth_group_permissions', + schema: 'public', + x: 510.7002780352177, + y: -100.63021316033364, + fields: [ + { + id: 'd4ftozj6uhbdxf3fwqvsxoo3z', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: + "nextval('auth_group_permissions_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'bvkmgqa1misk2pjwjwof9cx60', + name: 'group_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'lyijn9tl7hf3gurdo5ug7l7fn', + name: 'permission_id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '5y4k0wiwytwu2672hlxss0vay', + name: 'auth_group_permissions_group_id_permission_id_key', + unique: true, + fieldIds: [ + 'bvkmgqa1misk2pjwjwof9cx60', + 'lyijn9tl7hf3gurdo5ug7l7fn', + ], + createdAt: Date.now(), + }, + { + id: 'y7yijhut1vzeal2aucj7fyi8t', + name: 'auth_group_permissions_pkey', + unique: true, + fieldIds: ['d4ftozj6uhbdxf3fwqvsxoo3z'], + createdAt: Date.now(), + }, + { + id: 'b5zdp69zqx0cnpnuz1fe35mif', + name: 'idx_auth_group_permissions_group_id', + unique: false, + fieldIds: ['bvkmgqa1misk2pjwjwof9cx60'], + createdAt: Date.now(), + }, + { + id: 'r7luj64081vml4puniy4no62k', + name: 'idx_auth_group_permissions_permission_id', + unique: false, + fieldIds: ['lyijn9tl7hf3gurdo5ug7l7fn'], + createdAt: Date.now(), + }, + ], + color: '#7175fa', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + ], + relationships: [ + { + id: '5fjfvdyd89kgo7z3nsjib17gv', + name: 'auth_group_permissions_permission_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'xvzbm8lrq4nl7lfk5zugumn2n', + targetTableId: '6ijscya6hovxhx0q7dsq5lgba', + sourceFieldId: 'lyijn9tl7hf3gurdo5ug7l7fn', + targetFieldId: 'leg6ngcahmqkrqbq5qnyw6o9c', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: '7rincnrlprecuwvvw02dwemeq', + name: 'django_admin_log_content_type_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'gp2tb8rtocqnpyrogbk72ti4e', + targetTableId: '0mwj7i78bohux3lamc5xeer9s', + sourceFieldId: '8ybk1fb6ce3v3fbaoh9sdrvno', + targetFieldId: 'aaswqtx7y5enj158iecrsvxv1', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: '7t9hv5d7szn6t3026obwyrmz5', + name: 'django_admin_log_user_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'gp2tb8rtocqnpyrogbk72ti4e', + targetTableId: 'srvnwsww376kltu4bqcaix74j', + sourceFieldId: 'm2bkd2omwo9cs94k7856vv2eo', + targetFieldId: 'n85uz79bjbt8c2o8pldag3rrr', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'irg0omwf0feagbc5y2iro4zy3', + name: 'auth_user_user_permissions_user_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '0sqcjqp0wh42ptj8ltj9shw5m', + targetTableId: 'srvnwsww376kltu4bqcaix74j', + sourceFieldId: '4ywckubg6r1nuyovtxai77g8x', + targetFieldId: 'n85uz79bjbt8c2o8pldag3rrr', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'j6yim4c01qkvl1bu9dm39grqg', + name: 'auth_user_user_permissions_permission_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '0sqcjqp0wh42ptj8ltj9shw5m', + targetTableId: '6ijscya6hovxhx0q7dsq5lgba', + sourceFieldId: '5fajzfjhgsf95siv43r3dhr9z', + targetFieldId: 'leg6ngcahmqkrqbq5qnyw6o9c', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'ppazloh3vnxbl98vmlpubeqwq', + name: 'auth_permission_content_type_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '6ijscya6hovxhx0q7dsq5lgba', + targetTableId: '0mwj7i78bohux3lamc5xeer9s', + sourceFieldId: '23lkh2kce9zuj24n73hl9kjfk', + targetFieldId: 'aaswqtx7y5enj158iecrsvxv1', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'qxnuct6h2dubpu6zg12uisw5c', + name: 'auth_user_groups_user_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'vsbckzn4y71ye7whfi5sw1o8t', + targetTableId: 'srvnwsww376kltu4bqcaix74j', + sourceFieldId: 'wte5c7eqpnh6614c64gmc8h56', + targetFieldId: 'n85uz79bjbt8c2o8pldag3rrr', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'txo52vd6u7xwaorgjr2q40ink', + name: 'auth_group_permissions_group_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'xvzbm8lrq4nl7lfk5zugumn2n', + targetTableId: 'ezfuiy69q3e1n0snzgci2aotf', + sourceFieldId: 'bvkmgqa1misk2pjwjwof9cx60', + targetFieldId: 'ezeknuboplfry5sbpiji8autf', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'w78nsg7j2if4cvntaj8qqqoor', + name: 'auth_user_groups_group_id_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'vsbckzn4y71ye7whfi5sw1o8t', + targetTableId: 'ezfuiy69q3e1n0snzgci2aotf', + sourceFieldId: 'g3afeo3sq0l3f2h5lcrajkowm', + targetFieldId: 'ezeknuboplfry5sbpiji8autf', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + ], + dependencies: [], + }, +}; diff --git a/src/templates-data/templates/employee-db.ts b/src/templates-data/templates/employee-db.ts index 5f01d6b6..18068533 100644 --- a/src/templates-data/templates/employee-db.ts +++ b/src/templates-data/templates/employee-db.ts @@ -11,7 +11,7 @@ export const employeeDb: Template = { 'A schema for database of employees, departments, and salaries.', image, imageDark, - tags: ['mysql'], + tags: ['MySQL'], featured: true, diagram: { id: 'employees_db', diff --git a/src/templates-data/templates/laravel-db.ts b/src/templates-data/templates/laravel-db.ts new file mode 100644 index 00000000..d3c1a527 --- /dev/null +++ b/src/templates-data/templates/laravel-db.ts @@ -0,0 +1,322 @@ +import { DatabaseType } from '@/lib/domain/database-type'; +import type { Template } from '../templates-data'; +import image from '@/assets/templates/laravel-db.png'; +import imageDark from '@/assets/templates/laravel-db-dark.png'; + +export const laravelDb: Template = { + slug: 'laravel-db', + name: 'Laravel', + shortDescription: 'PHP web framework', + description: + 'With elegant syntax, simplifying web development by streamlining common tasks across projects', + image, + imageDark, + tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'], + featured: true, + url: 'https://github.com/laravel/laravel', + diagram: { + id: 'laravel_db', + name: 'laravel-db', + createdAt: new Date(), + updatedAt: new Date(), + databaseType: DatabaseType.POSTGRESQL, + tables: [ + { + id: 'tzwvz1wtn84fny03tzl1sl0ho', + name: 'failed_jobs', + schema: 'public', + x: 737.7682179548738, + y: 139.69501050040327, + fields: [ + { + id: 'stybn7gf7n84qhv3kizvxz13p', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('failed_jobs_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: '9fyo2qdmsglsw7ctthmzlep1j', + name: 'connection', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'ut52fvqjpa0u27jd2t6t92tom', + name: 'queue', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'plvfv0t9im2km2v0a0qzt8udo', + name: 'payload', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'g5ef3gfi72xw0xeb0x6ox4b7r', + name: 'exception', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'ez9j04lvylcn570ne77xjsbta', + name: 'failed_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'ht83plkt884y1myetskx9redz', + name: 'idx_failed_jobs_failed_at', + unique: false, + fieldIds: ['ez9j04lvylcn570ne77xjsbta'], + createdAt: Date.now(), + }, + { + id: 'ztnvgd4m167ut9473h1kiofge', + name: 'failed_jobs_pkey', + unique: true, + fieldIds: ['stybn7gf7n84qhv3kizvxz13p'], + createdAt: Date.now(), + }, + ], + color: '#ffe374', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'ytrk4k6ihrm2fhkodz3t2ovzb', + name: 'migrations', + schema: 'public', + x: 146.59849058742998, + y: 208.72981137066984, + fields: [ + { + id: 'uldhz9mhxosp9dqfmmpvabzta', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('migrations_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'wjccp1hwlalr87ct56q35mf11', + name: 'migration', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'jomrea7wdjx21q2510vyxz0y7', + name: 'batch', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'tbyc6yvknlhyff4pw6ideqnde', + name: 'migrations_pkey', + unique: true, + fieldIds: ['uldhz9mhxosp9dqfmmpvabzta'], + createdAt: Date.now(), + }, + ], + color: '#4dee8a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'yw7xlj5rjjevf292enea0qbgv', + name: 'users', + schema: 'public', + x: 422.62737943432694, + y: -112.94222230620639, + fields: [ + { + id: '79ny0my0rv9ztzg7ww735rmrj', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval('users_id_seq'::regclass)", + createdAt: Date.now(), + }, + { + id: 'lzzou36zm6l6r4vmizdf24q8x', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'lh4oc6cam3kb161f1thohs95j', + name: 'email', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'luulms1e4cbai05978ufc0xdi', + name: 'email_verified_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'xai5t98b0syebn21hkdvcf6sg', + name: 'password', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'b93oi649bi053g51mfobb94mq', + name: 'remember_token', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '76dz2udxcbudh5c8sdmauwsas', + name: 'created_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '267qdi3o75bdg9lsf5wuhku9s', + name: 'updated_at', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'uc19mnyl8xllnfjoaz3qkesi5', + name: 'idx_users_email', + unique: false, + fieldIds: ['lh4oc6cam3kb161f1thohs95j'], + createdAt: Date.now(), + }, + { + id: 'tgx4fsgm3j6q793g7ttfdr8em', + name: 'users_email_key', + unique: true, + fieldIds: ['lh4oc6cam3kb161f1thohs95j'], + createdAt: Date.now(), + }, + { + id: 'kmp3sogww6j7lovhrv25dolxp', + name: 'users_pkey', + unique: true, + fieldIds: ['79ny0my0rv9ztzg7ww735rmrj'], + createdAt: Date.now(), + }, + ], + color: '#ff6b8a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + ], + relationships: [], + dependencies: [], + }, +}; diff --git a/src/templates-data/templates/pokemon-db.ts b/src/templates-data/templates/pokemon-db.ts index 73aaec53..8fb2a85d 100644 --- a/src/templates-data/templates/pokemon-db.ts +++ b/src/templates-data/templates/pokemon-db.ts @@ -10,7 +10,7 @@ export const pokemonDb: Template = { description: 'Mysql Relational of 722 pokemons. 14 Tables 5 views.', image, imageDark, - tags: ['mysql', 'pokemon', 'example apps'], + tags: ['MySQL', 'Pokemon', 'Example Apps'], featured: true, url: 'https://github.com/brianr852/Pokemon-Database', diagram: { diff --git a/src/templates-data/templates/twitter-db.ts b/src/templates-data/templates/twitter-db.ts new file mode 100644 index 00000000..212adb66 --- /dev/null +++ b/src/templates-data/templates/twitter-db.ts @@ -0,0 +1,1191 @@ +import { DatabaseType } from '@/lib/domain/database-type'; +import type { Template } from '../templates-data'; +import image from '@/assets/templates/twitter-db.png'; +import imageDark from '@/assets/templates/twitter-db-dark.png'; + +export const twitterDb: Template = { + slug: 'twitter-db', + name: 'Twitter Database', + shortDescription: 'Social media platform clone application', + description: + 'Built with React - Example database schema diagram for twitter', + image, + imageDark, + tags: ['Postgres', 'Example Apps'], + url: 'https://github.com/SukhjinderArora/twitter-clone', + featured: true, + diagram: { + id: 'twitter_db', + name: 'twitter-db', + createdAt: new Date(), + updatedAt: new Date(), + databaseType: DatabaseType.POSTGRESQL, + tables: [ + { + id: '8r838c9y1hc4fkcvma0cecb05', + name: 'Like', + schema: 'public', + x: 215.4643003004653, + y: -274.2299630066947, + fields: [ + { + id: 'jae5crhu5xja3mar6czqqicuy', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''Like_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: 'fipxudoexhscqb14l0n4tcyjx', + name: 'postid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'twhv3410zdar1ng7i99u3kott', + name: 'userid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'juj94hakf20jxwgvi2oe8drz6', + name: 'createdat', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'now()', + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '00w7f7rnuvi789romrqkisoeb', + name: 'Like_postid_userid_key', + unique: true, + fieldIds: [ + 'fipxudoexhscqb14l0n4tcyjx', + 'twhv3410zdar1ng7i99u3kott', + ], + createdAt: Date.now(), + }, + { + id: 'tiblzdur5a8kssck3d5m1bluk', + name: 'Like_pkey', + unique: true, + fieldIds: ['jae5crhu5xja3mar6czqqicuy'], + createdAt: Date.now(), + }, + ], + color: '#ff9f74', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'f3ir61irh5ojw78vndtw8b79f', + name: 'User', + schema: 'public', + x: 100, + y: 100, + fields: [ + { + id: 'edv3mqdnxmd73dzslj88juqi6', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''User_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: '5wc2nf9pfmixd7zkk8kgrt2n2', + name: 'email', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'd7ubhcy7q1fg9mx35ja6n8i9l', + name: 'username', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'any0s2bb0jxtq637egmpwkncb', + name: 'newuser', + type: { + id: 'boolean', + name: 'boolean', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'true', + createdAt: Date.now(), + }, + { + id: 'ccr07obnqemhszf617ophazna', + name: 'hashedpassword', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'taij0zfubjtv5tzs5o2bi1udh', + name: 'googleid', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'ts5d0e1opaozhxxwuwz1jh0lv', + name: 'provider', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '3xbeiu1hpxmjjmsqgea4k0hzw', + name: 'createdat', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'now()', + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'e57f1ahtuld35uox92np1cqj7', + name: 'User_username_key', + unique: true, + fieldIds: ['d7ubhcy7q1fg9mx35ja6n8i9l'], + createdAt: Date.now(), + }, + { + id: 'x5iiiavaxvwgldn798xijaqkk', + name: 'User_pkey', + unique: true, + fieldIds: ['edv3mqdnxmd73dzslj88juqi6'], + createdAt: Date.now(), + }, + { + id: '789z9r8rpjg814szoc9lg72o0', + name: 'User_googleid_key', + unique: true, + fieldIds: ['taij0zfubjtv5tzs5o2bi1udh'], + createdAt: Date.now(), + }, + { + id: 'onlbml2lw4z0ra9ygnxq3u4zw', + name: 'User_email_key', + unique: true, + fieldIds: ['5wc2nf9pfmixd7zkk8kgrt2n2'], + createdAt: Date.now(), + }, + { + id: 'ren1qgnsgmm6rep3tc6j7toi6', + name: 'idx_user_email', + unique: false, + fieldIds: ['5wc2nf9pfmixd7zkk8kgrt2n2'], + createdAt: Date.now(), + }, + ], + color: '#4dee8a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'hjer8y7ptfrnewg00996fyfhn', + name: 'Repost', + schema: 'public', + x: 931.3525851499921, + y: 112.1582284657909, + fields: [ + { + id: '98v7voi7al9v51073025d9nvo', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''Repost_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: 'hex9fbibsfr3ow0tcfbk7betm', + name: 'postid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '5zijm9q8aiws5hh3m5batuxe7', + name: 'userid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'hkgrjousxikrk9axcg9r9misq', + name: 'createdat', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'now()', + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'psrmldly681302c2gomswq46z', + name: 'Repost_postid_userid_key', + unique: true, + fieldIds: [ + 'hex9fbibsfr3ow0tcfbk7betm', + '5zijm9q8aiws5hh3m5batuxe7', + ], + createdAt: Date.now(), + }, + { + id: 'c6wv89j1un8jelf2ryt40cxba', + name: 'Repost_pkey', + unique: true, + fieldIds: ['98v7voi7al9v51073025d9nvo'], + createdAt: Date.now(), + }, + ], + color: '#ff6b8a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'iirurhm7fyd17x560haevq3z7', + name: 'Message', + schema: 'public', + x: 143.17436008224922, + y: 574.004438816938, + fields: [ + { + id: 'jt9diiumnav14qm6tttqhsatu', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''Message_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: 'eb73ebfdgo1zgb0qo3rbvv2cv', + name: 'userid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'ddtfddxbxm5de8ossyvjay2wj', + name: 'content', + type: { + id: 'text', + name: 'text', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '3k6et6h3p77o8xurfxexonn4g', + name: 'createdat', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'now()', + createdAt: Date.now(), + }, + { + id: 'cx91z6ddp3q8c68trs6xr46ix', + name: 'read', + type: { + id: 'boolean', + name: 'boolean', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'false', + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'u4alcd8pela93bn9e5su51egq', + name: 'idx_message_userid', + unique: false, + fieldIds: ['eb73ebfdgo1zgb0qo3rbvv2cv'], + createdAt: Date.now(), + }, + { + id: 'obqzdiu0dent56boie9pver77', + name: 'Message_pkey', + unique: true, + fieldIds: ['jt9diiumnav14qm6tttqhsatu'], + createdAt: Date.now(), + }, + ], + color: '#4dee8a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'kdulwzc8u47und8xiq72uazoy', + name: 'Profile', + schema: 'public', + x: -492.3396916273415, + y: 146.5446167956863, + fields: [ + { + id: 'la09618z5lkc8xebbzhanaqs1', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''Profile_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: '8b108h5gp8rnvfsj0rq4bg8t0', + name: 'name', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '5nr0a9vmwwbszd1amx3beokqj', + name: 'bio', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'xd0b5duywzzi9gikirfa1sbmi', + name: 'img', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '7tn9xp7mt7yj1ucp2mysrzwcm', + name: 'website', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'ixlimpuctzxxbyjbuxvqpvhw0', + name: 'dob', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 're7rw32e2je7o56flj57ok4mg', + name: 'userid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: true, + nullable: true, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'kw45i9vtnba3x0o8nat5ih8uz', + name: 'Profile_pkey', + unique: true, + fieldIds: ['la09618z5lkc8xebbzhanaqs1'], + createdAt: Date.now(), + }, + { + id: 'tm1kytur62t64sb8vcrqwt8kb', + name: 'Profile_userid_key', + unique: true, + fieldIds: ['re7rw32e2je7o56flj57ok4mg'], + createdAt: Date.now(), + }, + ], + color: '#8a61f5', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'rbt6dtrelt775wjvfc0a59rg4', + name: 'Post', + schema: 'public', + x: 699.5760154509387, + y: -205.88919444693533, + fields: [ + { + id: 'an2tmb382pjncp4wubxbij9wm', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''Post_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: 'lklsot6i7yc9tll98zddcs97c', + name: 'content', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'poma7xnfr1dmmyrsies1a23rw', + name: 'userid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: '2cv1vo8g4hn00swgr4t6pm9ub', + name: 'parentpostid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'rknox7nc3jc0ccnbdquv6nxj5', + name: 'createdat', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'now()', + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'ji1erflh8l0rc36z8jful1z5t', + name: 'idx_post_userid', + unique: false, + fieldIds: ['poma7xnfr1dmmyrsies1a23rw'], + createdAt: Date.now(), + }, + { + id: 'a76d9komiftihg91rqhljumwh', + name: 'Post_pkey', + unique: true, + fieldIds: ['an2tmb382pjncp4wubxbij9wm'], + createdAt: Date.now(), + }, + ], + color: '#c05dcf', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'ufdx9uy8byh4xxl3chqjqkyua', + name: 'Chat', + schema: 'public', + x: 539.4273664767843, + y: 402.2764763220126, + fields: [ + { + id: 'bbhp35md0uebcvcrtmlg2dzfi', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''Chat_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: '3wv67cinqb5x6j4ktvkdewdwq', + name: 'userid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '5groprr6mhc4vj37i9039b9mr', + name: 'participantid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'vt82kcj0ad51slnkomxewmm44', + name: 'Chat_userid_participantid_key', + unique: true, + fieldIds: [ + '3wv67cinqb5x6j4ktvkdewdwq', + '5groprr6mhc4vj37i9039b9mr', + ], + createdAt: Date.now(), + }, + { + id: 'xoe36361m8dg0o2z4ljvvjy7i', + name: 'Chat_pkey', + unique: true, + fieldIds: ['bbhp35md0uebcvcrtmlg2dzfi'], + createdAt: Date.now(), + }, + ], + color: '#8a61f5', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'vunmmeczg0dkk5ix251ynnfbb', + name: 'Notification', + schema: 'public', + x: -374.2894474789282, + y: 502.3971819506827, + fields: [ + { + id: '77zuv2mcpq421it13s7cyuwgq', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''Notification_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: 'o9j9tr8xaax2tuqz4vycjlnv2', + name: 'senderid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'd3e7y7tqb4fbgll7zda49mx32', + name: 'recipientid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'hw6mbi69435z9ezsv2r4p0h80', + name: 'type', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: '51x9olwd6jkuiv8nmtcntr5f8', + name: 'objecttype', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'hpvbn8zn19ns3u9zz2k2y5uj8', + name: 'objecturi', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'h97w8n5biact9xxw2fldu0nse', + name: 'read', + type: { + id: 'boolean', + name: 'boolean', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'false', + createdAt: Date.now(), + }, + { + id: 'ce26sjaridgdl3xztfqd9ln7m', + name: 'createdat', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'now()', + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: 'tjm89iw1xm5v0qacmbaftlhzz', + name: 'idx_notification_recipientid', + unique: false, + fieldIds: ['d3e7y7tqb4fbgll7zda49mx32'], + createdAt: Date.now(), + }, + { + id: '9dg1huvld3kwkdvgp5urvys3s', + name: 'Notification_pkey', + unique: true, + fieldIds: ['77zuv2mcpq421it13s7cyuwgq'], + createdAt: Date.now(), + }, + { + id: '4e00qrcr85hzo2uzeqqccxp8d', + name: 'idx_notification_senderid', + unique: false, + fieldIds: ['o9j9tr8xaax2tuqz4vycjlnv2'], + createdAt: Date.now(), + }, + ], + color: '#42e0c0', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'wuzpuxvp14j26nr849oreti3b', + name: 'Session', + schema: 'public', + x: -488.00908267032764, + y: -283.1421060187986, + fields: [ + { + id: '2f1h9duzadbj7jj6cmw0g7ibd', + name: 'id', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: true, + nullable: false, + default: "nextval(''Session_id_seq''::regclass)", + createdAt: Date.now(), + }, + { + id: '0e1ixz9dgeb3n5d4vm88fpzvh', + name: 'refreshtoken', + type: { + id: 'character_varying', + name: 'character varying', + }, + primaryKey: false, + unique: true, + nullable: false, + createdAt: Date.now(), + }, + { + id: '0zmpz1kbu81r5m59ny4kmz9tc', + name: 'expirationtime', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'kx8jya4j7dfbm2b3vyfkq2a1h', + name: 'userid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: false, + unique: false, + nullable: true, + createdAt: Date.now(), + }, + { + id: 'amfhr25hoxtjac07v8tizbgy7', + name: 'createdat', + type: { + id: 'timestamp_with_time_zone', + name: 'timestamp with time zone', + }, + primaryKey: false, + unique: false, + nullable: true, + default: 'now()', + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '4rmxi71tbl7yrili92ea7dzqe', + name: 'Session_refreshtoken_key', + unique: true, + fieldIds: ['0e1ixz9dgeb3n5d4vm88fpzvh'], + createdAt: Date.now(), + }, + { + id: 'ams0bc0y9s1qid7bxb3m3bfgi', + name: 'Session_pkey', + unique: true, + fieldIds: ['2f1h9duzadbj7jj6cmw0g7ibd'], + createdAt: Date.now(), + }, + ], + color: '#9ef07a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + { + id: 'zrdsnpx9zk8d50xx8k39dnra9', + name: 'UserFollows', + schema: 'public', + x: -121.02792878761841, + y: -335.64119299067147, + fields: [ + { + id: 'f7ev9zvz0jbjq37uw70zt4bsh', + name: 'userid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + { + id: 'kf50n5zzvcwu5z8y1ftdqovzg', + name: 'followerid', + type: { + id: 'integer', + name: 'integer', + }, + primaryKey: true, + unique: false, + nullable: false, + createdAt: Date.now(), + }, + ], + indexes: [ + { + id: '3ebw0y7u3t0912otkmf30t7es', + name: 'UserFollows_pkey', + unique: true, + fieldIds: [ + 'f7ev9zvz0jbjq37uw70zt4bsh', + 'kf50n5zzvcwu5z8y1ftdqovzg', + ], + createdAt: Date.now(), + }, + ], + color: '#4dee8a', + isView: false, + isMaterializedView: false, + createdAt: Date.now(), + }, + ], + relationships: [ + { + id: '2mfs9cyhxcvw48qgopecwyrkg', + name: 'Post_userid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'rbt6dtrelt775wjvfc0a59rg4', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 'poma7xnfr1dmmyrsies1a23rw', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: '2uy6uqg3jui570v503xfi3inq', + name: 'Chat_userid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'ufdx9uy8byh4xxl3chqjqkyua', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: '3wv67cinqb5x6j4ktvkdewdwq', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: '4y64qyi7m40x1kz8ywgfz108r', + name: 'Profile_userid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'kdulwzc8u47und8xiq72uazoy', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 're7rw32e2je7o56flj57ok4mg', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'one', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: '5b61u8wm2ullvbk49g8s04rvb', + name: 'Like_postid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '8r838c9y1hc4fkcvma0cecb05', + targetTableId: 'rbt6dtrelt775wjvfc0a59rg4', + sourceFieldId: 'fipxudoexhscqb14l0n4tcyjx', + targetFieldId: 'an2tmb382pjncp4wubxbij9wm', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'al8mk741va3hgqbfl6uie53si', + name: 'Post_parentpostid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'rbt6dtrelt775wjvfc0a59rg4', + targetTableId: 'rbt6dtrelt775wjvfc0a59rg4', + sourceFieldId: '2cv1vo8g4hn00swgr4t6pm9ub', + targetFieldId: 'an2tmb382pjncp4wubxbij9wm', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'aldfes1y0abu386exvjdj4z4d', + name: 'fk_post_replies', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'rbt6dtrelt775wjvfc0a59rg4', + targetTableId: 'rbt6dtrelt775wjvfc0a59rg4', + sourceFieldId: '2cv1vo8g4hn00swgr4t6pm9ub', + targetFieldId: 'an2tmb382pjncp4wubxbij9wm', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'b030u5ok6ig22s3g2qdvabngv', + name: 'Notification_senderid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'vunmmeczg0dkk5ix251ynnfbb', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 'o9j9tr8xaax2tuqz4vycjlnv2', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'gry1byfovn8jxd98ljzk8v3km', + name: 'Like_userid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: '8r838c9y1hc4fkcvma0cecb05', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 'twhv3410zdar1ng7i99u3kott', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'i58mq8fba46gzcb3fj5hr2k3k', + name: 'Session_userid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'wuzpuxvp14j26nr849oreti3b', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 'kx8jya4j7dfbm2b3vyfkq2a1h', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'j7t2pgkerxk7nula18sb824rm', + name: 'Notification_recipientid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'vunmmeczg0dkk5ix251ynnfbb', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 'd3e7y7tqb4fbgll7zda49mx32', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'ka5jwq5bkhzrqni93q14idgh7', + name: 'Repost_userid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'hjer8y7ptfrnewg00996fyfhn', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: '5zijm9q8aiws5hh3m5batuxe7', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'kxlw0u5a1um3kfknyucw3osp8', + name: 'Message_userid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'iirurhm7fyd17x560haevq3z7', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 'eb73ebfdgo1zgb0qo3rbvv2cv', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'lj54y21e3vb874g91sy09ih1v', + name: 'Chat_participantid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'ufdx9uy8byh4xxl3chqjqkyua', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: '5groprr6mhc4vj37i9039b9mr', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'tocur798csmml6on4usc9fs3c', + name: 'Repost_postid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'hjer8y7ptfrnewg00996fyfhn', + targetTableId: 'rbt6dtrelt775wjvfc0a59rg4', + sourceFieldId: 'hex9fbibsfr3ow0tcfbk7betm', + targetFieldId: 'an2tmb382pjncp4wubxbij9wm', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'tr3le7ar9ui0zfba6ptrdx3r7', + name: 'UserFollows_userid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'zrdsnpx9zk8d50xx8k39dnra9', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 'f7ev9zvz0jbjq37uw70zt4bsh', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + { + id: 'xmoimjsyg58livkhol8v17vyz', + name: 'UserFollows_followerid_fkey', + sourceSchema: 'public', + targetSchema: 'public', + sourceTableId: 'zrdsnpx9zk8d50xx8k39dnra9', + targetTableId: 'f3ir61irh5ojw78vndtw8b79f', + sourceFieldId: 'kf50n5zzvcwu5z8y1ftdqovzg', + targetFieldId: 'edv3mqdnxmd73dzslj88juqi6', + sourceCardinality: 'many', + targetCardinality: 'one', + createdAt: Date.now(), + }, + ], + dependencies: [], + }, +}; diff --git a/src/templates-data/templates/visual-novel-db.ts b/src/templates-data/templates/visual-novel-db.ts index af6ac27c..33764136 100644 --- a/src/templates-data/templates/visual-novel-db.ts +++ b/src/templates-data/templates/visual-novel-db.ts @@ -11,7 +11,7 @@ export const visualNovelDb: Template = { 'A comprehensive database for information about visual novels.', image, imageDark, - tags: ['postgres'], + tags: ['Postgres'], featured: true, url: 'https://vndb.org', diagram: { diff --git a/src/templates-data/templates/wordpress-db.ts b/src/templates-data/templates/wordpress-db.ts index 3c643c70..4e36e694 100644 --- a/src/templates-data/templates/wordpress-db.ts +++ b/src/templates-data/templates/wordpress-db.ts @@ -11,7 +11,7 @@ export const wordpressDb: Template = { '(CMS) ideal for building websites, blogs, or apps. Flexible, customizable, and designed for developers to expand', image, imageDark, - tags: ['mysql', 'open source', 'WordPress', 'php'], + tags: ['MySQL', 'Open Source', 'WordPress', 'PHP'], featured: true, url: 'https://wordpress.org', diagram: {