[ "basic_count"=>"基本重量(KG)", "basic_price"=>"基本运费(元)", "extra_count"=>"续重重量(KG)", "extra_price"=>"续重运费(元)" ], 2 => [ "basic_count"=>"基本数量(件)", "basic_price"=>"基本运费(元)", "extra_count"=>"续重数量(件)", "extra_price"=>"续重运费(元)" ] ]; /** * {@inheritdoc} */ public static function tableName() { return 'ats_express_area'; } /** * {@inheritdoc} */ public function rules() { return [ [['province', 'city', 'area'], 'string'], [['express_template'], 'integer'], [['extra_price', 'basic_price', 'basic_count', 'extra_count'], 'safe'], [['extra_price', 'basic_price', 'basic_count', 'extra_count'], 'number'], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'id', 'province' => '省份', 'city' => '城市', 'area' => '区域', 'express_template' => '运费模板id', 'extra_price' => '续重运费', 'basic_price' => '基本运费', 'basic_count' => '基本数量', 'extra_count' => '续重数量', 'updated_at' => '更新时间', 'created_at' => '创建时间', ]; } /** * @author linyao * @email 602604991@qq.com * @created Nov 8, 2019 * * 行为存储创建时间和更新时间 */ public function behaviors() { return [ [ 'class' => TimestampBehavior::className(), 'createdAtAttribute' => 'created_at', 'updatedAtAttribute' => 'updated_at', 'value' => function() { return time(); }, ], ]; } }