<% /*
    $Revision$
    $Id$

    File:           model_kpi_definitie.inc

    Description:    Model voor kpi_definitie

    Context:

    Notes:
*/
%>

<%
function model_kpi_definitie()
{
    this.records_name = "kpidefinitions";
    this.record_name = "kpidefinition";
    this.table = "kpi_definitie";
    this.primary = "kpi_definitie_key";
    this.autfunction = "WEB_PRSSYS";
    this.record_title = L("lcl_kpi_definitie_frame");
    this.records_title = L("lcl_kpi_definitie_title");

    this.fields = {
        "id": {
            "dbs": "kpi_definitie_key",
            "label": L("lcl_key"),
            "typ": "key",
            "required": true,
            "seq": "kpi_s_kpi_definitie_key"
        },
        "code": {
            "dbs": "kpi_definitie_code",
            "label": L('kpi_definitie_code'),
            "typ": "varchar",
            "required": true,
            "defaultvalue": null
        },
        "name": {
            "dbs": "kpi_definitie_omschrijving",
            "label": L("kpi_definitie_omschrijving"),
            "typ": "varchar",
            "required": true,
            "filter": "like",
            "defaultvalue": null
        },
        "info": {
            "dbs": "kpi_definitie_info",
            "label": L("kpi_definitie_info"),
            "typ": "memo",
            "required": true,
            "filter": "like",
            "defaultvalue": null
        },
        "proces": {
            "dbs": "kpi_definitie_categorie1",
            "label": L("kpi_definitie_categorie1"),
            "typ": "varchar",
            "required": true,
            "defaultvalue": null
        },
        "part": {
            "dbs": "kpi_definitie_categorie2",
            "label": L("kpi_definitie_categorie2"),
            "typ": "varchar",
            "required": true,
            "defaultvalue": null
        },
        "altgroup": {
            "dbs": "kpi_definitie_categorie3",
            "label": L("kpi_definitie_categorie3"),
            "typ": "varchar",
            "defaultvalue": null
        },
        "threshold": {
            "dbs": "kpi_definitie_drempels",
            "label": L("kpi_definitie_drempels"),
            "typ": "varchar",
            "multiedit": true
        },
        "authorization": {
            "dbs": "fac_functie_key",
            "label": L("fac_functie_key"),
            "typ": "key",
            "foreign": "fac_functie",
            "LOVinit": "",
            "multiedit": true
        }
    };

//    this.includes = {
//        "kpiscore" : {
//            "model": new model_kpi_score(this),
//            "joinfield": "kpi",
//            enable_update: true
//        }
//    };


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

    this.list = {
        "columns": ["code", "name", "info", "proces", "part", "altgroup", "threshold", "authorization"]
    };

    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);
}
%>