File tree Expand file tree Collapse file tree
packages/apps/reputation-oracle/server/src/modules/user Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { SetNonNullable } from 'type-fest' ;
22import { UserEntity } from './user.entity' ;
33
4+ /**
5+ * ATM UserEntity is used to store two different domain objects
6+ * that have intersection in properties:
7+ * = Operator - aka "Oracle"; it should be authorized using web3 signature
8+ * and always has evmAddres, but never has email, password and some other fields
9+ * - Web2User - is "Worker", admin user and HUMAN App; they always
10+ * have email & password, but might not have evmAddress
11+ *
12+ * Until we split the DB model - we differentiate them in code using differen types.
13+ */
14+
415export type Web2UserEntity = SetNonNullable < UserEntity , 'email' | 'password' > ;
516
617export type OperatorUserEntity = SetNonNullable <
You can’t perform that action at this time.
0 commit comments