PropSchema v0.3.0 Animagus.CSVMapping
A model for the csv_mappings table. Include functionality for changeset validations and display/index lookups.
Link to this section Summary
Functions
Creates a changeset from the data
and params
. Runs several validations on the changes
Returns the fields in the schema and their type
Returns the allowed regexes for printing out in the new
endpoint
Link to this section Types
Link to this type
t()
t() :: %Animagus.CSVMapping{ __meta__: term(), date_format: term(), email: term(), event_date: term(), event_name: term(), expected_columns: term(), external_location_id: term(), file_regex: term(), id: term(), inserted_at: term(), integration_name: term(), name_regex: term(), parser: term(), primary_name: term(), primary_phone: term(), secondary_name: term(), secondary_phone: term(), tertiary_phone: term(), updated_at: term() }
Link to this section Functions
Creates a changeset from the data
and params
. Runs several validations on the changes:
- Required fields
- The integer fields should be positive
- The name_regex field should only have the allowed values
- No two integer fields should have the same value
- All integer fields should be less than the expected_columns field’s value
- The combination of integration_name and event_name should be unique
Returns the fields in the schema and their type
Returns the allowed regexes for printing out in the new
endpoint.