<% /*
    $Revision$
    $Id$

    File:           model_mld_meldbron.inc

    Description:    Vanuit CodeCharge gegenereerd model voor mld_meldbron

    Context:

    Notes:
*/
%>
<%

function model_mld_meldbron()
{
    this.records_name = "callsources";
    this.record_name = "callsource",
    this.table = "mld_meldbron";
    this.primary = "mld_meldbron_key";
    this.soft_delete = "mld_meldbron_verwijder";
    this.autfunction = "WEB_MLDMGT";
    this.record_title = L("mld_meldbron");
    this.records_title = L("mld_meldbron_m");


    this.fields = {
        "id": {
            "dbs": "mld_meldbron_key",
            "label": "Key",
            "typ": "key",
            "required": true,
            "seq": "mld_s_mld_meldbron_key"
        },
        "name": {
            "dbs": "mld_meldbron_omschrijving",
            "label": L("mld_meldbron_omschrijving"),
            "typ": "varchar",
            "required": true
        },
        "selectable": {
            "dbs": "mld_meldbron_kiesbaar",
            "label": L("mld_meldbron_kiesbaar"),
            "typ": "number",
            "bits": [
                {
                    "name": "",
                    "label": "",
                    "typ": "check",
                    "mask": 3,
                    "radios": [
                        {
                            "name": "select_fo",
                            "label": L("mld_meldbron_kiesbaar1"),
                            "mask": 1,
                            "defaultvalue": 0
                        },
                        {
                            "name": "edit_ext",
                            "label": L("mld_meldbron_kiesbaar2"),
                            "mask": 2,
                            "defaultvalue": 0
                        }
                    ]
                }
            ],
            "defaultvalue": "0"
        },
        "selectable_select_fo": {
            "dbs": "selectable_select_fo",
            "sql": "CASE WHEN (BITAND(mld_meldbron.mld_meldbron_kiesbaar,1)=1) THEN 1 ELSE 0 END",
            "label": L("mld_meldbron_kiesbaar1"),
            "typ": "check0"
        },
        "selectable_edit_ext": {
            "dbs": "selectable_exit_ext",
            "sql": "CASE WHEN (BITAND(mld_meldbron.mld_meldbron_kiesbaar,2)=2) THEN 1 ELSE 0 END",
            "label": L("mld_meldbron_kiesbaar2"),
            "typ": "check0"
        }
    };


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