Files
Facilitor/APPL/API2/model_fac_groep.inc
Jos Groot Lipman bc92fc04a9 FSN#35817 Autorisaties via API2/Scaffolding
svn path=/Website/trunk/; revision=28587
2016-03-22 21:03:30 +00:00

79 lines
1.9 KiB
PHP

<% /*
$Revision$
$Id$
File: model_fac_groep.inc
Description: Model voor fac_groep
Context:
Notes:
*/
%>
<!-- #include file="model_fac_gebruikersgroep.inc" -->
<!-- #include file="model_fac_groeprechten.inc" -->
<%
function model_fac_groep(groep_key, params)
{
this.table = "fac_groep";
this.primary = "fac_groep_key";
this.records_name = "fac_groeps";
this.record_name = "fac_groep";
this.fields = {
"id": {
"dbs": "fac_groep_key",
"label": "Key",
"typ": "key",
"required": true,
"filter": "exact",
"seq": "fac_s_fac_groep_key"
},
"name": {
"dbs": "fac_groep_omschrijving",
"label": L("fac_groep_omschrijving"),
"typ": "varchar",
"filter": "like",
"required": true
},
"remark": {
"dbs": "fac_groep_opmerking",
"label": L("fac_groep_opmerking"),
"typ": "memo",
"filter": "like"
},
"substitutes": {
"dbs": "fac_groep_collega",
"label": L("lcl_prs_substitutes"),
"typ": "check0"
}
}
this.includes = {
"users": {
"model": new model_fac_gebruikersgroep(),
"joinfield": "fac_groep"
}
};
if (params.functie_key > 0)
{
this.includes["authorization"]
= {
"model": new model_fac_groeprechten(params),
"joinfield": "fac_groep",
outertoggle: { def: false, lbl: "Toon alle groepen" }
};
}
this.autfunction = "WEB_FACMSU";
this.record_title = L("fac_groep");
this.records_title = L("fac_groep_m");
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);
}
%>