ds_types.anubis 4.21 KB
/*
 * Created by PyramIDE.
 * User: フランスのトトロ aka (David RENÉ) 
 * Date: 07/02/2017
 * Time: 23:05
 * © David RENÉ
 */

read densaku_lib/types/densaku.anubis

public define List(DS_Type_File)  calexium_lib_types_description =
  [ds_type_file( auto, auto,
  [
//  public type DB_id:
//    none,
//    db_id(Int value).
    ds_type("DB_id", [
      enum("none", comment("no database Primary Key ID")),
      alternative("db_id", [
        component( int, "value", comment("Integer value of the Primary Key ID"))
      ])
    ]),

// public type DB_datetime:
//   db_datetime(String datetime). //Date and time in ISO8601 format "YYYY-MM-DD hh:mm:ss"
    ds_type("DB_datetime", [
      alternative("db_datetime", [
        component(string, "datetime", comment("Date and time in ISO8601 format \"YYYY-MM-DD hh:mm:ss\""))
      ])
   ]),
   
// public type DB_date:
//   db_date(String date).        //Date in ISO8601 format "YYYY-MM-DD"
    ds_type("DB_date", [
      alternative("db_date", [
        component(string, "date", comment("Date and time in ISO8601 format \"YYYY-MM-DD\""))
      ])
   ]),
   
// public type DB_time:
//   db_time(String time).        //Time in ISO8601 format "hh:mm:ss"
    ds_type("DB_time", [
      alternative("db_time", [
        component(string, "time", comment("Date and time in ISO8601 format \"hh:mm:ss\""))
      ])
   ]),
  
// public type DB_integer:
//   db_integer(Int value).
// calexium_lib/database/db_types.anubis
    ds_type("DB_integer", [
      alternative("db_integer", [
        component(int, "value", comment("Integer from datatase"))
      ])
   ]),

//  public type MIME:
//   mime(String        type,
//        String        sybtype,
//        List(String)  file_extensions).
// library/web/mime.anubis
    ds_type("MIME", [
      alternative("mime", [
        component(string, "type"),
        component(string, "subtype"),
        component(list, string, "file_extensions")
      ])
    ]),

    ds_type("WEB_Action_Name", [
      enum("no_action"),
      alternative("controller_action", [
        component(string, "controller"),
        component(string, "ac_name")
      ]),
      alternative("action_name", [
        component(string, "ac_name")
      ]),
      
      //url is raw action, hence we will only copy that url in final link
      alternative("url", comment("url is raw action, hence we will only copy that url in final link"), [
        component(string,  "url_name", )
      ])
    ]),
    
// public type Email_Address:
//  email_address(String name, String address).
// 
    ds_type("Email_Address", [
      alternative("email_address", [
        component(string, "name"),
        component(string, "address")
      ])
    ]),
   
//public type Email_to_send :
//  data_to_send(
//    Email_Address         from, 
//    List(Email_Address)   to, 
//    List(Email_Address)   cc, 
//    List(Email_Address)   bcc, 
//    String                subject,
//    String                content,
//    List(File_Attached)   files,
//    Bool                  send_copy,  //send copy to sender by bcc (useful when the email is sent by an automat)
//    String                       from, 
//    String                reply_to
//  ).
  
    ds_type("Email_to_send", [
      alternative("data_to_send", [
        component(ds_type("Email_Address"),       "from", comment("email sent from that sender")),
        component(list, ds_type("Email_Address"), "to",   comment("email sent to that list of recipients")),
        component(list, ds_type("Email_Address"), "cc",   comment("email sent as copy to that list of recipients")),
        component(list, ds_type("Email_Address"), "bcc",  comment("email sent as blank carbon copy to that list of recipients")),
        component(string,                         "subject",  comment("subject of email. Supposed to be UTF8")),
        component(string,                         "content",  comment("content of the email")),
        component(list, string,                   "files",    comment("list of files")),
        component(bool,                           "send_copy",comment("send copy to sender by bcc (useful when the email is sent by an automat)")),
        component(string,                         "reply_to", comment("reply to !!"))
      ])
    ])
  ]
  )]
.