Portal/rsconcept/frontend/src/features/users/models/user.ts

32 lines
647 B
TypeScript
Raw Normal View History

2024-06-07 20:17:03 +03:00
/**
* Module: Models for Users.
*/
/**
* Represents {@link User} identifier type.
*/
export type UserID = number;
/**
* Represents user detailed information.
* Some information should only be accessible to authorized users
*/
export interface IUser {
id: UserID;
username: string;
is_staff: boolean;
email: string;
first_name: string;
last_name: string;
}
/**
* Represents user profile for viewing and editing {@link IUser}.
*/
export interface IUserProfile extends Omit<IUser, 'is_staff'> {}
/**
* Represents user reference information.
*/
export interface IUserInfo extends Omit<IUserProfile, 'email' | 'username'> {}