TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'] ] ] ]; } /** * @inheritdoc */ public function rules() { return [ [["id", "order_id", "goods_id", "num", "created_at", "is_delete", "delivery_type", "is_level", "activity_id"], 'integer'], [["total_price", "profit", 'integral', 'integral_price'], 'number'], [["goods_name", "attr", "pic", "goods_info"], 'string'] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ "id" => "", "order_id" => "", "goods_id" => "", "goods_name" => "商品名称", "num" => "商品数量", "total_price" => "此商品的总价", "created_at" => "", "is_delete" => "", "attr" => "商品规格", "pic" => "商品规格图片", "goods_info" => "商品快照", "delivery_type" => "0:快递,1:自提, 2:同城配送", "is_level" => "是否是会员支付", "profit" => "分红", "activity_id" => "活动ID" ]; } }