user.ts 800 B

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