| @@ 16-32 (lines=17) @@ | ||
| 13 | ||
| 14 | class Pay extends \Model |
|
| 15 | {
|
|
| 16 | public static function relations() |
|
| 17 | {
|
|
| 18 | return [ |
|
| 19 | 'currency' => [ |
|
| 20 | 'model' => 'Money\Currency', |
|
| 21 | 'col' => 'currency_id' |
|
| 22 | ], |
|
| 23 | 'status' => [ |
|
| 24 | 'model' => 'Money\Pay\Status', |
|
| 25 | 'col' => 'pay_status_id' |
|
| 26 | ], |
|
| 27 | 'user' => [ |
|
| 28 | 'model' => 'Users\User', |
|
| 29 | 'col' => 'user_id' |
|
| 30 | ] |
|
| 31 | ]; |
|
| 32 | } |
|
| 33 | ||
| 34 | public static $cols = [ |
|
| 35 | 'currency_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'currency'], |
|
| @@ 165-181 (lines=17) @@ | ||
| 162 | ]; |
|
| 163 | } |
|
| 164 | ||
| 165 | public static function relations() |
|
| 166 | { |
|
| 167 | return [ |
|
| 168 | 'user' => [ |
|
| 169 | 'model' => 'Users\User', |
|
| 170 | 'col' => 'user_id' |
|
| 171 | ], |
|
| 172 | 'toUser' => [ |
|
| 173 | 'model' => 'Users\User', |
|
| 174 | 'col' => 'to_user_id' |
|
| 175 | ], |
|
| 176 | 'currency' => [ |
|
| 177 | 'model' => 'Money\Currency', |
|
| 178 | 'col' => 'currency_id' |
|
| 179 | ] |
|
| 180 | ]; |
|
| 181 | } |
|
| 182 | ||
| 183 | public function name() |
|
| 184 | { |
|