Msdata.SystPerms (mscmp_syst_perms v0.1.0)

Definition of a system/application permission.

Defined in MscmpSystPerms.

Summary

Functions

Creates a validated Ecto.Changeset struct for inserting into the database.

Creates a validated Ecto.Changeset struct for updating an existing database record.

Types

t()

@type t() :: %Msdata.SystPerms{
  __meta__: Ecto.Schema.Metadata.t(),
  admin_scope_options: [MscmpSystPerms.Types.rights_scope()] | nil,
  diag_role_created: String.t() | nil,
  diag_role_modified: String.t() | nil,
  diag_row_version: integer() | nil,
  diag_timestamp_created: DateTime.t() | nil,
  diag_timestamp_modified: DateTime.t() | nil,
  diag_update_count: integer() | nil,
  diag_wallclock_modified: DateTime.t() | nil,
  display_name: String.t() | nil,
  id: Ecto.UUID.t() | nil,
  internal_name: MscmpSystPerms.Types.perm_name() | nil,
  maint_scope_options: [MscmpSystPerms.Types.rights_scope()] | nil,
  ops_scope_options: [MscmpSystPerms.Types.rights_scope()] | nil,
  perm_functional_type: term(),
  perm_functional_type_id: MscmpSystPerms.Types.perm_functional_type_id() | nil,
  perm_role_grants: term(),
  syst_defined: boolean() | nil,
  syst_description: String.t() | nil,
  user_description: String.t() | nil,
  view_scope_options: [MscmpSystPerms.Types.rights_scope()] | nil
}

Functions

insert_changeset(insert_params, opts \\ [])

@spec insert_changeset(MscmpSystPerms.Types.perm_params(), Keyword.t()) ::
  Ecto.Changeset.t()

Creates a validated Ecto.Changeset struct for inserting into the database.

Parameters

  • insert_params - the initial values with which to populate the new record.

  • opts - a keyword list of options to control the validation.

Options

  • :min_internal_name_length (pos_integer/0) - Sets the minimum grapheme length of internal_name values. The default value is 6.

  • :max_internal_name_length (pos_integer/0) - Sets the maximum grapheme length of internal_name values. The default value is 64.

  • :min_display_name_length (pos_integer/0) - Sets the minimum grapheme length of display_name values. The default value is 6.

  • :max_display_name_length (pos_integer/0) - Sets the maximum grapheme length of display_name values. The default value is 64.

  • :min_user_description_length (pos_integer/0) - Sets the minimum grapheme length of user_description values. The default value is 6.

  • :max_user_description_length (pos_integer/0) - Sets the maximum grapheme length of user_description values. The default value is 1000.

update_changeset(perm, update_params, opts \\ [])

@spec update_changeset(t(), MscmpSystPerms.Types.perm_params(), Keyword.t()) ::
  Ecto.Changeset.t()

Creates a validated Ecto.Changeset struct for updating an existing database record.

Parameters

  • perm - The Msdata.SystPerms record to update.

  • update_params - the values with which to update the record.

  • opts - a keyword list of options to control the validation.

Options

  • :min_internal_name_length (pos_integer/0) - Sets the minimum grapheme length of internal_name values. The default value is 6.

  • :max_internal_name_length (pos_integer/0) - Sets the maximum grapheme length of internal_name values. The default value is 64.

  • :min_display_name_length (pos_integer/0) - Sets the minimum grapheme length of display_name values. The default value is 6.

  • :max_display_name_length (pos_integer/0) - Sets the maximum grapheme length of display_name values. The default value is 64.

  • :min_user_description_length (pos_integer/0) - Sets the minimum grapheme length of user_description values. The default value is 6.

  • :max_user_description_length (pos_integer/0) - Sets the maximum grapheme length of user_description values. The default value is 1000.