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.

69 lines
1.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. import type { IconName } from "../external/icons";
  2. import type Item from "./item";
  3. import type { TaskResult } from "./task";
  4. export default interface Project {
  5. id: string
  6. groupId: string | null
  7. name: string
  8. description: string
  9. icon: IconName
  10. active: boolean
  11. createdTime: string
  12. favorite: boolean
  13. subtractAmount: number
  14. tags: string[]
  15. taskSortFields: string[]
  16. startTime?: string
  17. endTime?: string
  18. statusTag?: string
  19. }
  20. export interface ProjectResult extends Project {
  21. tasks: TaskResult[]
  22. subtractions: ProjectSubtraction[]
  23. }
  24. export interface ProjectSubtraction {
  25. item: Item
  26. amount: number
  27. }
  28. export interface ProjectFilter {
  29. active?: boolean
  30. favorite?: boolean
  31. expiring?: boolean
  32. includeSemiActive?: boolean
  33. }
  34. export interface ProjectInput {
  35. name: string
  36. groupId?: string
  37. description: string
  38. icon: IconName
  39. active: boolean
  40. subtractAmount: number
  41. startTime?: string | Date
  42. endTime?: string | Date
  43. statusTag?: string
  44. favorite?: boolean
  45. tags?: string[]
  46. taskSortFields?: string[]
  47. }
  48. export interface ProjectUpdate {
  49. name?: string
  50. description?: string
  51. groupId?: string
  52. icon?: string
  53. active?: boolean
  54. startTime?: string | Date
  55. clearStartTime?: boolean
  56. endTime?: string | Date
  57. clearEndTime?: boolean
  58. statusTag?: string
  59. clearStatusTag?: boolean
  60. subtractAmount?: number
  61. favorite?: boolean
  62. setTags?: string[]
  63. taskSortFields?: string[]
  64. }