Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace app\models\customer;
- use yii\db\ActiveRecord;
- /**
- * Class CustomerRecord
- * @package app\models\customer
- *
- * @property string $name
- * @property \DateTime $birth_date
- * @property string $notes
- * @property PhoneRecord[] $phones
- */
- class CustomerRecord extends ActiveRecord {
- public static function tableName() {
- return 'customer';
- }
- public function rules() {
- return [
- ['id', 'number'],
- ['name', 'required'],
- ['name', 'string', 'max' => 256],
- ['birth_date', 'date', 'format' => 'dd.MM.yyyy'],
- ['notes', 'safe']
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement