diff --git a/APPL/API2/model_ctr_scenario.inc b/APPL/API2/model_ctr_scenario.inc new file mode 100644 index 0000000000..c8419524c2 --- /dev/null +++ b/APPL/API2/model_ctr_scenario.inc @@ -0,0 +1,71 @@ +<% /* + $Revision$ + $Id$ + + File: model_ctr_scenario.inc + + Description: Model voor scenario's + + Context: + + Notes: +*/ +%> + +<% + +function model_ctr_scenario() +{ + this.records_name = "scenarios"; + this.record_name = "scenario"; + this.table = "ins_scenario"; + this.primary = "ins_scenario_key"; + this.autfunction = "WEB_BEZMGT"; + this.record_title = L("ctr_scenario"); + this.records_title = L("ctr_scenario_m"); + + + this.fields = { + "id": { + "dbs": "ins_scenario_key", + "label": L("lcl_key"), + "typ": "key", + "required": true, + "filter": "exact", + "seq": "ins_s_ins_scenario_key" + }, + "name": { + "dbs": "ins_scenario_omschrijving", + "label": L("ctr_scenario_omschrijving"), + "typ": "varchar", + "required": true, + "translate": true + }, + "remark": { + "dbs": "ins_scenario_opmerking", + "label": L("ctr_scenario_opmerking"), + "typ": "varchar", + "translate": true + }, + "status": { + "dbs": "ins_scenario_status", + "label": L("ctr_scenario_status"), + "foreign": ins.getscenariostatustext, + "typ": "exact" + }, + "person": { + "dbs": "prs_perslid_key", + "label": L("lcl_user"), + "typ": "key", + "foreign" : "prs_perslid", + readonly: 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, {}); +} +%> \ No newline at end of file