<% /* $Revision$ $Id$ File: model_bgt_discipline.inc Description: Model voor budget disciplines Context: Notes: intern hebben we een apart model voor bgt_disc_params Naar de buitenwereld presenteren we het als één model */ %> <% function model_bgt_discipline(disc_key, params) { // Eén model voor de buitenwereld var disc = new _model_bgt_discipline(); api2.merge_disc_params_model(this, disc); this.REST_GET = generic_REST_GET(disc, // Let op: de originele _model { "GET": { wheres: [ "ins_tab_discipline.ins_discipline_module = 'BGT'" ] } } ) this.REST_POST = generic_REST_POST(disc); this.REST_PUT = generic_REST_PUT(disc); this.REST_DELETE = generic_REST_DELETE(this, {}); } function _model_bgt_discipline() { this.records_name = "budgetdisciplines"; this.record_name = "budgetdiscipline"; this.table = "ins_tab_discipline"; this.primary = "ins_discipline_key"; this.autfunction = "WEB_BGTMAN"; this.record_title = L("bgt_discipline"); this.records_title = L("bgt_discipline_m"); this.fields = { "id": { "dbs": "ins_discipline_key", "label": L("lcl_key"), "typ": "key", "required": true, "filter": "exact", "seq": "ins_s_ins_discipline_key" }, "module": { "dbs": "ins_discipline_module", "label": L("bgt_discipline_module"), "typ": "varchar", "hidden_fld": true, "defaultvalue": "BGT" }, "name": { "dbs": "ins_discipline_omschrijving", "label": L("bgt_discipline_omschrijving"), "typ": "varchar", "translate": true, "required": true }, "sequence": { "dbs": "ins_discipline_volgnr", "label": L("bgt_discipline_volgnr"), "typ": "number" }, "vat": { "dbs": "ins_discipline_btw", "label": L("bgt_discipline_btw"), "typ": "check", "default": "false" } }; /* Velden van BGT_DISC_PARAMS komen er dynamisch bij */ this.disc_params = { model: model_bgt_disc_params, joinfield: "budgetdiscipline" }; //this.soft_delete = "ins_discipline_verwijder"; // ik wil er iig niet standaard op kunnen filteren } %>