50], [['shipping_id'], 'string', 'max' => 10], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'id', 'order_id' => '订单id', 'shipping_name' => '货流名称', 'shipping_id' => '运货单位', 'type' => '类型', 'goods' => '商品', 'status' => '状态', 'decription' => '描述', '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(); }, ], ]; } }