<% /*
    $Revision$
    $Id$

    File:           model_res_arrangement_artikel.inc

    Description:    Vanuit CodeCharge gegenereerd model voor res_arrangement_artikel

    Context:

    Notes:
*/
%>
<%

function model_res_arrangement_artikel(fnparams)
{
    this.gparams = {fn: fnparams || {} };
    this.records_name = "packageitems";
    this.record_name = "packageitem";
    this.table = "res_arrangement_artikel";
    this.primary = "res_arrangement_artikel_key";
    this.autfunction = "WEB_RESMSU";
    this.record_title = L("res_arrangement_artikel");
    this.records_title = L("res_arrangement_artikel_m");
    this.defaultIcon = "fa-mug-hot";

    this.fields = {
        "id": {
            "dbs": "res_arrangement_artikel_key",
            "label": L("lcl_key"),
            "typ": "key",
            "hidden_fld": true,
            "required": true,
            "seq": "res_s_res_arrangement_art_key"
        },
        "package": {
            "dbs": "res_arrangement_key",
            "label": L("res_arrangement"),
            "typ": "key",
            "required": true,
            "foreign": {
                "tbl": "res_arrangement",
                "key": "res_arrangement_key",
                "desc": "res_arrangement_omschrijving"
            },
            "uniquewith": "item"
        },
        "item": {
            "dbs": "res_artikel_key",
            "label": L("res_artikel"),
            "typ": "key",
            "required": true,
            "foreign": {
                "tbl": "res_artikel",
                "key": "res_artikel_key",
                "desc": "res_artikel_omschrijving"
            },
            "uniquewith": "package"
        }
    };


    this.list = {
        "columns": [
            "id",
            "package",
            "item"
        ]
    };
    this.search = {
        "autosearch": true
    };
    this.edit = {
        modal: true
    };


    this.REST_GET    = generic_REST_GET(this, this.gparams);
    this.REST_POST   = generic_REST_POST(this);
    this.REST_PUT    = generic_REST_PUT(this);
    this.REST_DELETE = generic_REST_DELETE(this, {});

}
%>