model.d.ts 685 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. declare const enum ChatType {
  2. Private = 'private',
  3. Group = 'group',
  4. Temp = 'temp'
  5. }
  6. interface IPrivateChat {
  7. chatID: number;
  8. chatType: ChatType.Private;
  9. }
  10. interface IGroupChat {
  11. chatID: number;
  12. chatType: ChatType.Group;
  13. }
  14. interface ITempChat {
  15. chatID: {qq: number, group: number, toString: () => string};
  16. chatType: ChatType.Temp;
  17. }
  18. type IChat = IPrivateChat | IGroupChat | ITempChat;
  19. interface ILock {
  20. workon: number;
  21. feed: string[];
  22. threads: {
  23. [key: string]:
  24. {
  25. offset: string,
  26. updatedAt: string,
  27. subscribers: IChat[],
  28. },
  29. };
  30. }
  31. interface IRedisConfig {
  32. redisHost: string;
  33. redisPort: number;
  34. redisExpireTime: number;
  35. }