api entities

This commit is contained in:
2022-10-11 12:18:12 +02:00
parent 63478aa887
commit 8866784d49
19 changed files with 106 additions and 21 deletions

5
core/.prettierrc.json Normal file
View File

@ -0,0 +1,5 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true
}

View File

@ -1,5 +1,7 @@
export type Entity = {
export type EntityInfo = {
uuid: string;
createdAt: Date;
updatedAt: Date;
};
export type EntityCtor = Partial<EntityInfo>;

View File

@ -1,2 +1,2 @@
export * from "./user";
export * from "./entity";
export * from './user';
export * from './entity';

View File

@ -1,10 +1,10 @@
import { Entity } from "./entity";
import { EntityInfo } from './entity';
export type UserInfo = {
name: string;
};
export type User = UserInfo & Entity;
export type User = UserInfo & EntityInfo;
export type CreateUserBody = {
name: string;
@ -12,3 +12,5 @@ export type CreateUserBody = {
};
export type LoginUserBody = CreateUserBody;
export type UserCtor = Partial<User>;

View File

@ -4,6 +4,7 @@
"declarationMap": true,
"composite": true,
"sourceMap": false,
"strictNullChecks": true,
"outDir": "dist"
},
"include": ["src/**/*"],