<% /*
    $Revision$
    $Id$

    File:           model_res_arrangement.inc

    Description:    Model voor res_arrangement

    Context:

    Notes:
*/
%>
<!-- #include file="model_res_arrangement_artikel.inc"-->
<%

function model_res_arrangement(fnparams)
{
    this.gparams = {fn: fnparams || {} };
    this.records_name = "packages";
    this.record_name = "package";
    this.table = "res_arrangement";
    this.primary = "res_arrangement_key";
    this.autfunction = "WEB_RESMSU";
    this.record_title = L("res_arrangement");
    this.records_title = L("res_arrangement_m");


    this.fields = {
        "id": {
            "dbs": "res_arrangement_key",
            "label": L("lcl_key"),
            "typ": "key",
            "hidden_fld": true,
            "required": true,
            "seq": "res_s_res_arrangement_key"
        },
        "name": {
            "dbs": "res_arrangement_omschrijving",
            "label": L("res_arrangement_omschrijving"),
            "typ": "varchar",
            "required": true
        },
        "remark": {
            "dbs": "res_arrangement_opmerking",
            "label": L("res_arrangement_opmerking"),
            "typ": "memo"
        }
    };

     this.includes = {
         "packageitems" : {
             "model": new model_res_arrangement_artikel(this),
             "joinfield": "package",
             "enable_update": true,
             "multiadd" : "item",
             "required": true
         }
     };

    this.list = {
        "columns": [
            "id",
            "name",
            "remark"
        ]
    };
    this.search = {
        "autosearch": true
    };

    this.edit = {
        modal: false
    };


    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, {});

}
%>