Move database value constants from File entity to SignatureFlow enum
where they belong as the single source of truth.
- Add SignatureFlow::NUMERIC_PARALLEL and NUMERIC_ORDERED_NUMERIC
- Remove circular dependency between File and SignatureFlow
- Update all references to use enum constants
- Use descriptive names instead of abbreviations
This follows single responsibility principle: the enum owns its
database representation.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Set default value of 0 for signer_order column to prevent NULL values
that would cause issues with sequential signing feature.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add postSchemaChange method to migrate existing data
- Set status = 2 (SIGNED) when signed IS NOT NULL
- Set status = 1 (ABLE_TO_SIGN) when signed IS NULL and file.status = 1
- Status 0 (DRAFT) remains as default
- Only update records with status = 0 to avoid overwriting
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Change SignRequestStatus enum from string-backed to int-backed (0, 1, 2)
- Update database migration to use SMALLINT instead of VARCHAR(20)
- Update SignRequest entity to use int type for status property
- Reduces storage overhead and improves performance
- Integer values: 0=draft, 1=able_to_sign, 2=signed
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>