<% /*
    $Revision$
    $Id$

    File:           model_alg_srtgebouw.inc

    Description:    Model voor alg_srtgebouw

    Context:

    Notes:
*/
%>
<%
function model_alg_srtgebouw()
{
    this.records_name = "buildingfunctions";
    this.record_name = "buildingfunction";
    this.table = "alg_srtgebouw";
    this.primary = "alg_srtgebouw_key";
    this.soft_delete = "alg_srtgebouw_verwijder";
    this.autfunction = "WEB_ALGMSU";
    this.record_title = L("alg_srtgebouw");
    this.records_title = L("alg_srtgebouw_m");
    var ins_score_enabled = S("ins_score_enabled");


    if (ins_score_enabled == 0)
    {
      this.fields = {
          "id": {
              "dbs": "alg_srtgebouw_key",
              "label": L("lcl_key"),
              "typ": "key",
              "required": true,
                "seq": "alg_s_alg_srtgebouw_key"
          },
          "name": {
              "dbs": "alg_srtgebouw_omschrijving",
              "label": L("alg_srtgebouw_omschrijving"),
              "typ": "varchar",
              "translate": true,
              "required": true
          },
          "applicable": {
              "dbs": "alg_srtgebouw_passief",
              "label": L("alg_srtgebouw_passief"),
              "typ": "check",
              "invert": true,
              "multiedit": true
          },
          "processingtime": {
              "dbs": "alg_srtgebouw_t_uitvoertijd",
              "label": L("lcl_mld_stduitvoertijd"),
              "obj": "MLD_T_UITVOERTIJD",
              "typ": "processingtime"
          },
          "criticaltime": {
              "dbs": "alg_srtgebouw_t_uitvoer_pr1",
              "obj": "MLD_T_UITVOERTIJD",
              "typ": "processingtime",
              "label": L("lcl_mld_uitvoertijd_kritisch"),
              "multiedit": true
          },
          "highprioritytime": {
              "dbs": "alg_srtgebouw_t_uitvoer_pr2",
              "obj": "MLD_T_UITVOERTIJD",
              "typ": "processingtime",
              "label": L("lcl_mld_uitvoertijd_hoog"),
              "multiedit": true
          },
          "lowprioritytime": {
              "dbs": "alg_srtgebouw_t_uitvoer_pr4",
              "obj": "MLD_T_UITVOERTIJD",
              "typ": "processingtime",
              "label": L("lcl_mld_uitvoertijd_laag"),
              "multiedit": true
          }
      };
    }
    else
    {
      this.fields = {
          "id": {
              "dbs": "alg_srtgebouw_key",
              "label": L("lcl_key"),
              "typ": "key",
              "required": true,
              "required": true,
                "seq": "alg_s_alg_srtgebouw_key"
          },
          "name": {
              "dbs": "alg_srtgebouw_omschrijving",
              "label": L("alg_srtgebouw_omschrijving"),
              "typ": "varchar",
              "required": true,
              "translate": true,
              "required": true
          },
          "applicable": {
              "dbs": "alg_srtgebouw_passief",
              "label": L("alg_srtgebouw_passief"),
              "typ": "check",
              "required": true,
              "invert": true,
              "multiedit": true
          },
          "aspectmaxvg": {                                // Veiligheid / Gezondheid.
              "dbs": "alg_srtgebouw_aspect_max_vg",
              "label": L("alg_srtgebouw_aspect_vg"),
              "typ": "number",
              "required": true,
              "defaultvalue": 1,
              "multiedit": true
          },
          "aspectmaxch": {                                // Cultuur Historische waarde.
              "dbs": "alg_srtgebouw_aspect_max_ch",
              "label": L("alg_srtgebouw_aspect_ch"),
              "typ": "number",
              "required": true,
              "defaultvalue": 2,
              "multiedit": true
          },
          "aspectmaxgb": {                                // Gebruik en Bedrijfsproces.
              "dbs": "alg_srtgebouw_aspect_max_gb",
              "label": L("alg_srtgebouw_aspect_gb"),
              "typ": "number",
              "required": true,
              "defaultvalue": 3,
              "multiedit": true
          },
          "aspectmaxtv": {                                // Technische Vervolgschade.
              "dbs": "alg_srtgebouw_aspect_max_tv",
              "label": L("alg_srtgebouw_aspect_tv"),
              "typ": "number",
              "required": true,
              "defaultvalue": 5,
              "multiedit": true
          },
          "aspectmaxtk": {                                // Toename Klachtenonderhoud.
              "dbs": "alg_srtgebouw_aspect_max_tk",
              "label": L("alg_srtgebouw_aspect_tk"),
              "typ": "number",
              "required": true,
              "defaultvalue": 5,
              "multiedit": true
          },
          "aspectmaxbe": {                                // Beleving / Esthetica.
              "dbs": "alg_srtgebouw_aspect_max_be",
              "label": L("alg_srtgebouw_aspect_be"),
              "typ": "number",
              "required": true,
              "defaultvalue": 7,
              "multiedit": true
          },
          "aspectmaxen": {                                // Energie (aanvulling).
              "dbs": "alg_srtgebouw_aspect_max_en",
              "label": L("alg_srtgebouw_aspect_en"),
              "typ": "number",
              "required": true,
              "defaultvalue": 4,
              "multiedit": true
          },
          "processingtime": {
              "dbs": "alg_srtgebouw_t_uitvoertijd",
              "label": L("lcl_mld_stduitvoertijd"),
              "obj": "MLD_T_UITVOERTIJD",
              "typ": "processingtime"
          }
      };
    }


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