<% /*
    $Revision$
    $Id$

    File:           model_aut_sp_map.inc
    Description:    Door sp 'released attributes'
    Notes:
*/

function model_aut_sp_map(params)
{
    params = params || {};
    this.records_name = "spmappings";
    this.record_name = "spmapping";
    this.table = "aut_sp_map";
    this.primary = "aut_sp_map_key";
    this.autfunction = params.internal?false:"WEB_FACTAB";
    this.record_title = L("aut_sp_map");
    this.records_title = L("aut_sp_map_m");
    this.defaultIcon = "fa-code-branch fa-rotate-270";

    this.fields = {
        "id": {
            "dbs": "aut_sp_map_key",
            "label": L("lcl_key"),
            "typ": "key",
            "seq": "aut_s_aut_sp_map_key"
        },
        "serviceprovider": {
            "dbs": "aut_sp_key",
            "label": L("aut_sp"),
            "typ": "key",
            "hidden_fld": true,
            "required": true
        },
        "name": {
            "dbs": "aut_sp_map_from",
            "label": L("aut_sp_map_from"),
            "typ": "key",
            "required": true,
// Vergelijk login.inc/function jwt_create()
// Technisch niet noodzakelijk maar houd hier wel een beetje dezelfde nummers aan als in model_aut_idp_map.inc
            "LOV":   "1;"   + L("lcl_prs_person_login")
                  + ";2;"   + L("lcl_prs_person_achternaam")
                  + ";3;"   + L("lcl_prs_person_voornaam")
//                  + ";5;"   + L("lcl_prs_organisatie")
//                  + ";6;"   + L("lcl_account")
//                  + ";7;"   + L("lcl_prs_person_function")
//                  + ";8;"   + L("lcl_lcl_taal")
                  + ";9;"   + L("lcl_prs_person_email")
                  + ";100;" + L("fac_groeprechten_m")
                  + ";101;" + L("lcl_workplace")
        },
        "to": {
            "dbs": "aut_sp_map_to",
            "label": L("aut_sp_map_to"),
            "typ": "varchar",
            "required": true
        }
    }

    this.edit = {
        "modal": true
    };

    this.list = {
        "columns": ["name", "to"]
    };

    this.REST_GET    = generic_REST_GET(this);
    this.REST_POST   = generic_REST_POST(this);
    this.REST_PUT    = generic_REST_PUT(this);
    this.REST_DELETE = generic_REST_DELETE(this);
}
%>