10], [['tag_name', 'module'], 'string', 'max' => 50], [['send_time'], 'safe'], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'merchant_id' => '商户id', 'store_id' => '店铺ID', 'msg_id' => '微信消息id', 'msg_data_id' => '图文消息数据id', 'tag_id' => '标签', 'tag_name' => '标签名称', 'fans_num' => '粉丝数量', 'module' => '模块类型', 'data' => 'Data', 'send_type' => '发送类别 1立即发送2定时发送', 'send_time' => '发送时间', 'send_status' => '0未发送 1已发送', 'final_send_time' => '最终发送时间', 'error_content' => '报错原因', 'status' => '状态[-1:删除;0:禁用;1启用]', 'created_at' => 'Created At', 'updated_at' => '修改时间', ]; } /** * @return ActiveQuery */ public function getAttachment() { return $this->hasOne(Attachment::class, ['id' => 'data']); } public function beforeSave($insert) { $this->send_time = StringHelper::dateToInt($this->send_time); return parent::beforeSave($insert); } }