svnno****@sourc*****
svnno****@sourc*****
2012年 6月 2日 (土) 00:12:56 JST
Revision: 110
http://sourceforge.jp/projects/smartupload/scm/svn/commits/110
Author: hryksbt
Date: 2012-06-02 00:12:56 +0900 (Sat, 02 Jun 2012)
Log Message:
-----------
カード会社モデル作成
Added Paths:
-----------
trunk/src/Engine/app/models/credit_campany.php
trunk/src/Engine/app/tests/fixtures/credit_campany_fixture.php
-------------- next part --------------
Added: trunk/src/Engine/app/models/credit_campany.php
===================================================================
--- trunk/src/Engine/app/models/credit_campany.php (rev 0)
+++ trunk/src/Engine/app/models/credit_campany.php 2012-06-01 15:12:56 UTC (rev 110)
@@ -0,0 +1,97 @@
+<?php
+class CreditCampany extends AppModel {
+ var $name = 'CreditCampany';
+ var $displayField = 'id';
+ var $validate = array(
+ 'campany_name' => array(
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ 'alphanumeric' => array(
+ 'rule' => array('alphanumeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'delete_flag' => array(
+ 'boolean' => array(
+ 'rule' => array('boolean'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'regist_date' => array(
+ 'date' => array(
+ 'rule' => array('date'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'modify_date' => array(
+ 'date' => array(
+ 'rule' => array('date'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ );
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+ var $hasMany = array(
+ 'User' => array(
+ 'className' => 'User',
+ 'foreignKey' => 'credit_campany_id',
+ 'dependent' => false,
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'exclusive' => '',
+ 'finderQuery' => '',
+ 'counterQuery' => ''
+ )
+ );
+
+}
Added: trunk/src/Engine/app/tests/fixtures/credit_campany_fixture.php
===================================================================
--- trunk/src/Engine/app/tests/fixtures/credit_campany_fixture.php (rev 0)
+++ trunk/src/Engine/app/tests/fixtures/credit_campany_fixture.php 2012-06-01 15:12:56 UTC (rev 110)
@@ -0,0 +1,25 @@
+<?php
+/* CreditCampany Fixture generated on: 2012-06-01 17:18:19 : 1338563899 */
+class CreditCampanyFixture extends CakeTestFixture {
+ var $name = 'CreditCampany';
+
+ var $fields = array(
+ 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'),
+ 'campany_name' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 64, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
+ 'delete_flag' => array('type' => 'integer', 'null' => false, 'default' => NULL),
+ 'regist_date' => array('type' => 'datetime', 'null' => false, 'default' => NULL),
+ 'modify_date' => array('type' => 'datetime', 'null' => false, 'default' => NULL),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
+ 'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
+ );
+
+ var $records = array(
+ array(
+ 'id' => 1,
+ 'campany_name' => 'Lorem ipsum dolor sit amet',
+ 'delete_flag' => 1,
+ 'regist_date' => '2012-06-01 17:18:19',
+ 'modify_date' => '2012-06-01 17:18:19'
+ ),
+ );
+}