| @@ 14-33 (lines=20) @@ | ||
| 11 | ||
| 12 | namespace Migrations\Migration\Object\Param; |
|
| 13 | ||
| 14 | class Value extends \Model |
|
| 15 | { |
|
| 16 | public static $cols = [ |
|
| 17 | 'origianl' => ['type' => 'textarea'], |
|
| 18 | 'replace' => ['type' => 'textarea'], |
|
| 19 | 'param_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'param'], |
|
| 20 | 'date_create' => ['type' => 'dateTime'], |
|
| 21 | ]; |
|
| 22 | ||
| 23 | public static function relations() |
|
| 24 | { |
|
| 25 | return [ |
|
| 26 | 'param' => [ |
|
| 27 | 'col' => 'param_id', |
|
| 28 | 'model' => 'Migrations\Migration\Object\Param' |
|
| 29 | ] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | } |
|
| 34 | ||
| @@ 14-33 (lines=20) @@ | ||
| 11 | ||
| 12 | namespace Money\Currency\ExchangeRate; |
|
| 13 | ||
| 14 | class History extends \Model |
|
| 15 | { |
|
| 16 | public static $cols = [ |
|
| 17 | 'currency_exchangerate_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'rate'], |
|
| 18 | 'old' => ['type' => 'decimal'], |
|
| 19 | 'new' => ['type' => 'decimal'], |
|
| 20 | 'date_create' => ['type' => 'dateTime'] |
|
| 21 | ]; |
|
| 22 | ||
| 23 | public static function relations() |
|
| 24 | { |
|
| 25 | return [ |
|
| 26 | 'rate' => [ |
|
| 27 | 'model' => 'Money\Currency\ExchangeRate\History', |
|
| 28 | 'col' => 'currency_exchangerate_id' |
|
| 29 | ], |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | } |
|
| 34 | ||
| @@ 14-33 (lines=20) @@ | ||
| 11 | ||
| 12 | namespace Users; |
|
| 13 | ||
| 14 | class Passre extends \Model |
|
| 15 | { |
|
| 16 | public static $cols = [ |
|
| 17 | 'hash' => ['type' => 'textarea'], |
|
| 18 | 'user_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'user'], |
|
| 19 | 'status' => ['type' => 'number'], |
|
| 20 | 'date_create' => ['type' => 'dateTime'] |
|
| 21 | ]; |
|
| 22 | ||
| 23 | public static function relations() |
|
| 24 | { |
|
| 25 | return[ |
|
| 26 | 'user' => [ |
|
| 27 | 'col' => 'user_id', |
|
| 28 | 'model' => 'Users\User' |
|
| 29 | ] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | } |
|
| 34 | ||