2023-11-24 17:42:23 +01:00
|
|
|
import { ContactInfoType } from "@app/core/common/enum/contact-info-type";
|
2023-12-29 16:04:16 +01:00
|
|
|
import { RoleOrganizationType } from "@app/core/common/enum/role-organization-type";
|
2023-11-24 17:42:23 +01:00
|
|
|
import { BaseEntity, BaseEntityPersist } from "@common/base/base-entity.model";
|
|
|
|
import { Guid } from "@common/types/guid";
|
|
|
|
import { Reference } from "../reference/reference";
|
2019-01-18 18:03:45 +01:00
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface User extends BaseEntity {
|
|
|
|
name: string;
|
|
|
|
additionalInfo: UserAdditionalInfo;
|
|
|
|
contacts: UserContactInfo[];
|
|
|
|
roles: UserRole[];
|
|
|
|
credentials: UserCredential[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserPersist extends BaseEntityPersist {
|
|
|
|
name: String;
|
|
|
|
additionalInfo: UserAdditionalInfoPersist;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserAdditionalInfoPersist {
|
|
|
|
avatarUrl: String;
|
|
|
|
timezone: String;
|
|
|
|
culture: String;
|
|
|
|
language: String;
|
|
|
|
roleOrganization: String;
|
|
|
|
organizationId: Guid;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserAdditionalInfo {
|
|
|
|
avatarUrl: String;
|
|
|
|
timezone: String;
|
|
|
|
culture: String;
|
|
|
|
language: String;
|
2023-12-29 16:04:16 +01:00
|
|
|
roleOrganization: RoleOrganizationType;
|
2023-11-24 17:42:23 +01:00
|
|
|
organization: Reference;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserContactInfo {
|
|
|
|
id: Guid;
|
|
|
|
value: String;
|
|
|
|
type: ContactInfoType;
|
|
|
|
ordinal: number;
|
|
|
|
user: User;
|
|
|
|
createdAt: Date;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserRole {
|
|
|
|
id: Guid;
|
|
|
|
role: String;
|
|
|
|
user: User;
|
|
|
|
createdAt: Date;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserRolePatchPersist {
|
|
|
|
id: Guid;
|
|
|
|
roles: String[];
|
|
|
|
hash: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserCredential {
|
|
|
|
id: Guid;
|
|
|
|
externalId: String;
|
|
|
|
user: User;
|
|
|
|
createdAt: Date;
|
|
|
|
}
|
2024-01-05 14:33:27 +01:00
|
|
|
|
|
|
|
export interface DmpAssociatedUser {
|
|
|
|
id: Guid;
|
|
|
|
name: string;
|
|
|
|
email: string;
|
|
|
|
}
|