You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1020 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. import type Item from "./item";
  2. import type { TaskWithProject } from "./task";
  3. export default interface Log {
  4. id: string
  5. taskId: string
  6. itemId: string
  7. itemAmount: number
  8. secondaryItemId?: string
  9. secondaryItemAmount: number
  10. loggedTime: string
  11. description: string
  12. }
  13. export interface LogFilter {
  14. minTime?: Date
  15. maxTime?: Date
  16. itemIds?: string[]
  17. projectIds?: string[]
  18. projectGroupIds?: string[]
  19. }
  20. export interface LogWithSecondaryItem extends Log {
  21. secondaryItem?: Item
  22. }
  23. export interface LogResult extends Log {
  24. task: TaskWithProject
  25. item: Item
  26. secondaryItem?: Item
  27. itemCounted?: boolean
  28. secondaryItemCounted?: boolean
  29. }
  30. export interface LogInput {
  31. taskId: string
  32. loggedTime?: string
  33. description: string
  34. itemAmount: number
  35. secondaryItemId?: string
  36. secondaryItemAmount?: number
  37. }
  38. export interface LogUpdate {
  39. loggedTime?: string
  40. description?: string
  41. itemAmount?: number
  42. secondaryItemId?: string
  43. secondaryItemAmount?: number
  44. clearSecondaryItemId?: boolean
  45. }