user.ts 635 B

12345678910111213141516171819202122232425262728
  1. import { Ref } from './common';
  2. import { HasObjectId } from './has-object-id';
  3. export type IUser = {
  4. name: string;
  5. username: string;
  6. email: string;
  7. password: string;
  8. imageUrlCached: string;
  9. admin: boolean;
  10. }
  11. export type IUserGroupRelation = {
  12. relatedGroup: Ref<IUserGroup>,
  13. relatedUser: Ref<IUser>,
  14. createdAt: Date,
  15. }
  16. export type IUserGroup = {
  17. name: string;
  18. createdAt: Date;
  19. description: string;
  20. parent: Ref<IUserGroup> | null;
  21. }
  22. export type IUserHasId = IUser & HasObjectId;
  23. export type IUserGroupHasId = IUserGroup & HasObjectId;
  24. export type IUserGroupRelationHasId = IUserGroupRelation & HasObjectId;