integer.ts 560 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { FieldResolverModule } from '#shared/entities/object-attributes/types/resolver.ts'
  3. import FieldResolver from '../FieldResolver.ts'
  4. export class FieldResolverInteger extends FieldResolver {
  5. fieldType = 'number'
  6. public fieldTypeAttributes() {
  7. return {
  8. props: {
  9. min: this.attributeConfig.min,
  10. max: this.attributeConfig.max,
  11. },
  12. }
  13. }
  14. }
  15. export default <FieldResolverModule>{
  16. type: 'integer',
  17. resolver: FieldResolverInteger,
  18. }