X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=configure.js;h=23a945a96d725ebb834baa65d15766de01b04fbd;hb=1e715ab70fa254cf6b4349e2d026e7d15d05d641;hp=e5a61aaeebe368d3dcbecfb2761d31148e40073a;hpb=abd8d0fdfc6707ddb536cf4f79a3629fdde7a944;p=webchat%2FWebChat.git diff --git a/configure.js b/configure.js index e5a61aa..23a945a 100644 --- a/configure.js +++ b/configure.js @@ -20,77 +20,123 @@ showip : false, //IPアドレスを表示するなら真。そうでないなら、偽 - //詳細画面と編集画面に表示するフィールド名と表示名の組み合わせ + //詳細画面と編集画面に表示するフィールド名と表示名の組み合わせおよびテーブル定義 //表示される順番はこの変数によって決まります - //連想配列の名称と型はinit.sqlと一致させること // //name 表示名を指定する //type データ型を指定する。指定可能な型は以下の通り // text 文字列型を受け付ける // password パスワードとして指定できるものを受け付ける。デフォルトではすべての文字列です - // number 数値型を受け付ける + // number 符号付数値型を受け付ける + // unsignednumber 符号なし数値型を受け付ける // textarea 改行を含む文字列型を受け付ける + // bool BOOL型を受け付ける + // datetime DATETIME型を受け付ける + //length 長さを指定する + // numberの場合、2がSMALLINT、4がINTに対応する + // textとpasswordの場合、最大長を指定する + //defaultvalue デフォルト値を指定する + //primary プライマリーキーとして指定するなら真。そうでないなら偽 + //isnotempty:真なら必須メンバーであることを表し、そうでないなら空欄でも構わないことを表す //visible 詳細画面に表示するなら真。そうでないなら偽 - //rule バリテーション時のルール - // 関数もしくは連想配列を指定する - // 関数を指定した場合は成功時にnullを返す - // 連想配列にしていできるメンバーは以下の通り - // isnotempty:真なら必須メンバーであることを表し、そうでないなら空欄でも構わないことを表す + //visible_edit 編集画面に表示するなら真。そうでないなら偽 + //rule バリテーション時に実行される関数を指定する + // 実行される関数でバリテーションが成功した場合、nullを返さなければならない alias : { + //name以外の項目を編集しないでください。正常に動作しなくなります + //ここから + name_hash: + { + name : "名前(ハッシュ)", + type : "unsignednumber", + length : 4, + primary : true, + visible : false, + visible_edit : false, + isnotempty : true + }, name : { name : "名前", type : "text", visible : true, - rule : {isnotempty : true} + visible_edit : true, + length : 64, + isnotempty : true }, password : { name : "パスワード", type : "password", + length : 32, + visible : false, + visible_edit : true, + }, + lastmodified : + { + name : "更新日付", + type : "datetime", visible : false, + visible_edit : false, }, + //ここまで mailto : { name : "メールアドレス", type : "mail", + length : 255, visible : false, + visible_edit : true, }, age : { name : "年齢", type : "number", + defaultvalue : 0, + length : 2, visible : true, + visible_edit : true, }, height : { name : "身長", type : "number", + defaultvalue : 0, + length : 2, visible : true, + visible_edit : true, }, weight : { name : "体重", type : "number", + defaultvalue : 0, + length : 2, visible : true, + visible_edit : true, }, gender : { name : "性別", type : "text", + length : 8, visible : true, + visible_edit : true, }, race : { name : "種族", type : "text", + length : 64, visible : true, + visible_edit : true, }, etc : { name : "備考", type : "textarea", visible : true, + visible_edit : true, }, }, };