diff options
Diffstat (limited to 'shared/models/users')
-rw-r--r-- | shared/models/users/index.ts | 4 | ||||
-rw-r--r-- | shared/models/users/user-create.model.ts | 5 | ||||
-rw-r--r-- | shared/models/users/user-role.type.ts | 1 | ||||
-rw-r--r-- | shared/models/users/user-update.model.ts | 4 | ||||
-rw-r--r-- | shared/models/users/user.model.ts | 10 |
5 files changed, 24 insertions, 0 deletions
diff --git a/shared/models/users/index.ts b/shared/models/users/index.ts new file mode 100644 index 000000000..414aaab08 --- /dev/null +++ b/shared/models/users/index.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | export * from './user.model' | ||
2 | export * from './user-create.model' | ||
3 | export * from './user-update.model' | ||
4 | export * from './user-role.type' | ||
diff --git a/shared/models/users/user-create.model.ts b/shared/models/users/user-create.model.ts new file mode 100644 index 000000000..2cddcdcb0 --- /dev/null +++ b/shared/models/users/user-create.model.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export interface UserCreate { | ||
2 | username: string | ||
3 | password: string | ||
4 | email: string | ||
5 | } | ||
diff --git a/shared/models/users/user-role.type.ts b/shared/models/users/user-role.type.ts new file mode 100644 index 000000000..b38c4c8c3 --- /dev/null +++ b/shared/models/users/user-role.type.ts | |||
@@ -0,0 +1 @@ | |||
export type UserRole = 'admin' | 'user' | |||
diff --git a/shared/models/users/user-update.model.ts b/shared/models/users/user-update.model.ts new file mode 100644 index 000000000..8b9abfb15 --- /dev/null +++ b/shared/models/users/user-update.model.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | export interface UserUpdate { | ||
2 | displayNSFW?: boolean | ||
3 | password?: string | ||
4 | } | ||
diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts new file mode 100644 index 000000000..5c48a17b2 --- /dev/null +++ b/shared/models/users/user.model.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | import { UserRole } from './user-role.type' | ||
2 | |||
3 | export interface User { | ||
4 | id: number | ||
5 | username: string | ||
6 | email: string | ||
7 | displayNSFW: boolean | ||
8 | role: UserRole | ||
9 | createdAt: Date | ||
10 | } | ||