diff options
Diffstat (limited to 'app/graphql/types/customer_relations/organization_type.rb')
-rw-r--r-- | app/graphql/types/customer_relations/organization_type.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/app/graphql/types/customer_relations/organization_type.rb b/app/graphql/types/customer_relations/organization_type.rb new file mode 100644 index 00000000000..0e091d4a9a3 --- /dev/null +++ b/app/graphql/types/customer_relations/organization_type.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +module Types + module CustomerRelations + class OrganizationType < BaseObject + graphql_name 'CustomerRelationsOrganization' + + authorize :read_organization + + field :id, + GraphQL::Types::ID, + null: false, + description: 'Internal ID of the organization.' + + field :name, + GraphQL::Types::String, + null: false, + description: 'Name of the organization.' + + field :default_rate, + GraphQL::Types::Float, + null: true, + description: 'Standard billing rate for the organization.' + + field :description, + GraphQL::Types::String, + null: true, + description: 'Description or notes for the organization.' + + field :created_at, + Types::TimeType, + null: false, + description: 'Timestamp the organization was created.' + + field :updated_at, + Types::TimeType, + null: false, + description: 'Timestamp the organization was last updated.' + end + end +end |