feat: added models

This commit is contained in:
2023-07-04 23:42:50 -03:00
parent fe0cacf145
commit 2d0f960d49
11 changed files with 94 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
import { type StringInput } from './primitives';
export interface CurrencyType {
label: StringInput;
}

View File

@@ -1 +1,4 @@
export * from './user';
export * from './spending';
export * from './spendingCategory';
export * from './currency';

View File

@@ -1,3 +1,5 @@
import { type z } from 'zod';
export type StringInput = string | z.ZodString | { type: StringConstructor; [key: string]: any };
export type StringInput = string | z.ZodString | { [key: string]: any; type: StringConstructor };
export type NumberInput = number | z.ZodNumber | { [key: string]: any; type: NumberConstructor };
export type DateInput = Date | z.ZodDate | { [key: string]: any; type: DateConstructor };

View File

@@ -0,0 +1,9 @@
import { type StringInput, type DateInput, type NumberInput } from './primitives';
export interface SpendingType {
amount: NumberInput;
currencyId: StringInput;
date: DateInput;
spendingCategoryId: StringInput;
userId: StringInput;
}

View File

@@ -0,0 +1,7 @@
import { type StringInput } from './primitives';
export interface SpendingCategoryType {
backgroundColor: StringInput;
label: StringInput;
userId: StringInput;
}