Advertisement
Guest User

model tarif

a guest
Oct 22nd, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.49 KB | None | 0 0
  1. <?php
  2.  
  3. namespace frontend\models;
  4.  
  5. use Yii;
  6.  
  7. /**
  8.  * This is the model class for table "tarif_cargo".
  9.  *
  10.  * @property int $tcargo_id
  11.  * @property string $service_id
  12.  * @property string $origin
  13.  * @property string $origin_name
  14.  * @property string $destination
  15.  * @property string $destination_name
  16.  * @property double $rate
  17.  * @property double $admin_fee
  18.  * @property int $lead_time
  19.  */
  20. class TarifCargo extends \yii\db\ActiveRecord
  21. {
  22.     /**
  23.      * {@inheritdoc}
  24.      */
  25.     public static function tableName()
  26.     {
  27.         return 'tarif_cargo';
  28.     }
  29.  
  30.     /**
  31.      * {@inheritdoc}
  32.      */
  33.     public function rules()
  34.     {
  35.         return [
  36.             [['rate', 'admin_fee'], 'number'],
  37.             [['lead_time'], 'integer'],
  38.             [['service_id'], 'string', 'max' => 20],
  39.             [['origin', 'destination'], 'string', 'max' => 6],
  40.             [['origin_name'], 'string', 'max' => 100],
  41.             [['destination_name'], 'string', 'max' => 1000],
  42.         ];
  43.     }
  44.  
  45.     /**
  46.      * {@inheritdoc}
  47.      */
  48.     public function attributeLabels()
  49.     {
  50.         return [
  51.             'tcargo_id' => 'Tcargo ID',
  52.             'service_id' => 'Service ID',
  53.             'origin' => 'Origin',
  54.             'origin_name' => 'Origin Name',
  55.             'destination' => 'Destination',
  56.             'destination_name' => 'Destination Name',
  57.             'rate' => 'Rate',
  58.             'admin_fee' => 'Admin Fee',
  59.             'lead_time' => 'Lead Time',
  60.         ];
  61.     }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement