begin sequelize
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
export interface Transaction {
|
||||
id: string;
|
||||
partner: string;
|
||||
|
||||
18
shared/src/model/user.ts
Normal file
18
shared/src/model/user.ts
Normal 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;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/shared",
|
||||
"outDir": "../dist/out-tsc/shared",
|
||||
"declaration": true,
|
||||
"module": "es2020"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user