begin sequelize

This commit is contained in:
eneller
2026-03-06 10:24:47 +01:00
parent fb0fc59240
commit d58b0babd2
7 changed files with 133 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
export interface Transaction {
id: string;
partner: string;

18
shared/src/model/user.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Table, Column, Model, CreatedAt, DataType} from 'sequelize-typescript';
@Table
export class User extends Model{
@Column({primaryKey: true, unique: true, allowNull: false})
userID: string;
@Column
displayName: string;
@Column(dataType: DataType.DECIMAL(20,2))
balance: number;
@CreatedAt
creationDate: Date;
}

View File

@@ -1,7 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc/shared",
"outDir": "../dist/out-tsc/shared",
"declaration": true,
"module": "es2020"
},