<% /*
    $Revision$
    $Id$

    File:           model_bes_staffeltabel.inc

    Description:

    Context:

    Notes:
*/
%>
<%

function model_bes_staffel()
{
    this.records_name = "orderpacelists";
    this.record_name = "orderpacelist";
    this.table = "bes_staffel";
    this.primary = "bes_staffel_key";
    this.autfunction = "WEB_BESMGT";
    this.record_title = L("bes_staffel");
    this.records_title = L("bes_staffel_m");
    this.defaultIcon = "fa-chart-mixed";

    this.fields = {
        "id": {
            "dbs": "bes_staffel_key",
            "label": L("lcl_key"),
            "typ": "key",
            "required": true,
            "seq": "bes_s_bes_staffel_key",
            "defaultvalue": null
        },
        "orderpacelisttable": {
            "dbs": "bes_staffeltabel_key",
            "label": L("bes_staffeltabel"),
            "typ": "key",
            "foreign": {
                "tbl": "bes_staffeltabel",
                "key": "bes_staffeltabel_key",
                "desc": "bes_staffeltabel_naam"
            }
        },
        "orderpacelimit": { // "limit" is een reserved naam in API2
            "dbs": "bes_staffel_grenswaarde",
            "label": L("bes_staffel_grens"),
            "typ": "number"
        },
        "discount": {
            "dbs": "bes_staffel_korting",
            "label": L("bes_staffel_korting"),
            "typ": "number"
        }
    };


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