20], [['province', 'city', 'area'], 'string', 'max' => 10], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'id', 'user_id' => '用户id', 'consignee' => '收件人', 'phone' => '电话', 'province' => '省份', 'city' => '城市', 'area' => '区域', 'address' => '详细地址', 'status' => '状态,0-默认值 1-默认地址', 'created_at' => '创建时间', 'updated_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(); }, ], ]; } }