<% /*
    $Revision$
    $Id$

    File:           model_bes_staffeltabel.inc

    Description:

    Context:

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

function model_bes_staffeltabel()
{
    this.records_name = "orderpacelisttables";
    this.record_name = "orderpacelisttable";
    this.table = "bes_staffeltabel";
    this.primary = "bes_staffeltabel_key";
    this.autfunction = "WEB_BESMGT";
    this.record_title = L("bes_staffeltabel");
    this.records_title = L("bes_staffeltabel_m");


    this.fields = {
        "id": {
            "dbs": "bes_staffeltabel_key",
            "label": L("lcl_key"),
            "typ": "key",
            "required": true,
            "seq": "bes_s_bes_staffeltabel_key",
            "defaultvalue": null
        },
        "name": {
            "dbs": "bes_staffeltabel_naam",
            "label": L("bes_staffeltabel_naam"),
            "typ": "varchar",
            "required": true
        },
        "pacelisttype": {
            "dbs": "fac_typestaffel_key",
            "label": L("bes_staffeltabel_type"),
            "typ": "key",
            "required": true,
            "foreign": {
                "tbl": "fac_typestaffel",
                "key": "fac_typestaffel_key",
                "desc": "fac_typestaffel_omschrijving"
            },
            "emptyoption": null,
            "showtransit": true
        },
        "group": {
            "dbs": "bes_staffeltabel_groep",
            "label": L("bes_staffeltabel_groep"),
            "typ": "check0"
        }
    };
    this.includes = {
        "orderpacelists": {
            "model": new model_bes_staffel(),
            "joinfield": "orderpacelisttable",
            "enable_update": true
        }
    };


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