feat(user): Init user module (#6293)

* init user module

* add migration

* update module with latest utils

* pr ready

* make interface types interfaces
This commit is contained in:
Philip Korsholm
2024-02-06 11:10:54 +08:00
committed by GitHub
parent 823b98aaa1
commit b2eaac8cb1
43 changed files with 1008 additions and 29 deletions

View File

@@ -0,0 +1,36 @@
{
"namespaces": [
"public"
],
"name": "public",
"tables": [
{
"columns": {
"id": {
"name": "id",
"type": "text",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "text"
}
},
"name": "user",
"schema": "public",
"indexes": [
{
"keyName": "user_pkey",
"columnNames": [
"id"
],
"composite": false,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {}
}
]
}

View File

@@ -0,0 +1,13 @@
import { Migration } from '@mikro-orm/migrations';
export class Migration20240201081925 extends Migration {
async up(): Promise<void> {
this.addSql('create table "user" ("id" text not null, constraint "user_pkey" primary key ("id"));');
}
async down(): Promise<void> {
this.addSql('drop table if exists "user" cascade;');
}
}