simnova / ownercommunity

MIT License
5 stars 1 forks source link

ticket messages #191

Closed nnoce14 closed 2 months ago

nnoce14 commented 2 months ago

Summary by Sourcery

This pull request introduces the ability to handle messages within ServiceTicket and ViolationTicket entities. It includes updates to the GraphQL schema, domain models, and repositories to support adding and updating messages, along with necessary type definitions and resolver implementations.

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request introduces the 'messages' field to both ServiceTicket and ViolationTicket types, along with their respective input types. New message types (ServiceTicketV1Message, ServiceTicketV1MessageInput, ViolationTicketV1Message, and ViolationTicketV1MessageInput) have been defined. The domain logic has been updated to handle the addition and updating of messages in service and violation tickets. New schemas and resolvers have been added to support these changes in the GraphQL layer. Additionally, memory and MongoDB adapters have been updated to handle the new message structures.

File-Level Changes

Files Changes
data-access/src/graphql/schema/builder/graphql.schema.json
data-access/src/graphql/schema/builder/generated.ts
ui-community/src/generated.tsx
Added 'messages' field to ServiceTicket and ViolationTicket types and input types. Defined new message types.
data-access/src/infrastructure-services-impl/datastore/mongodb/infrastructure/cases/service-ticket/v1/service-ticket.domain-adapter.ts
data-access/src/infrastructure-services-impl/datastore/mongodb/infrastructure/cases/violation-ticket/v1/violation-ticket.domain-adapter.ts
Added 'messages' getter to domain adapters and defined new message domain adapter classes.
data-access/src/app/application-services/cases/service-ticket/v1/service-ticket.domain.ts
data-access/src/app/domain/contexts/cases/service-ticket/v1/service-ticket.ts
data-access/src/app/domain/contexts/cases/violation-ticket/v1/violation-ticket.ts
Updated domain logic to handle 'messages' field in service and violation tickets.
data-access/src/graphql/schema/types/service-ticket.graphql
data-access/src/graphql/schema/types/violation-ticket.graphql
Added 'messages' field to GraphQL types and input types. Defined new message types.
data-access/src/infrastructure-services-impl/datastore/mongodb/models/cases/service-ticket.ts
data-access/src/infrastructure-services-impl/datastore/mongodb/models/cases/violation-ticket.ts
Defined new message schemas and added 'messages' field to service and violation ticket schemas.
data-access/src/infrastructure-services-impl/datastore/memorydb/infrastructure/cases/service-ticket/v1/service-ticket.memory-repository.ts
data-access/src/infrastructure-services-impl/datastore/memorydb/infrastructure/cases/violation-ticket/v1/violation-ticket.memory-repository.ts
Defined new memory message classes and added 'messages' field to memory repositories.
data-access/src/graphql/schema/types/service-ticket.resolvers.ts
data-access/src/graphql/schema/types/violation-ticket.resolvers.ts
Added resolvers for initiatedBy field in message types.
data-access/src/app/domain/contexts/cases/service-ticket/v1/service-ticket-v1-message.ts
data-access/src/app/domain/contexts/cases/violation-ticket/v1/violation-ticket-v1-message.ts
Defined new message entity classes.
data-access/src/app/domain/contexts/cases/service-ticket/v1/service-ticket-v1-message.value-objects.ts
data-access/src/app/domain/contexts/cases/violation-ticket/v1/violation-ticket-v1-message.value-objects.ts
Defined value objects for message types.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.