admin/app/common/models/TemplateMessage.php

69 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Created by PhpStorm.
* Author:
* Date: 17/03/2017
* Time: 16:26
*/
namespace app\common\models;
class TemplateMessage extends BaseModel
{
public $table = 'yz_template_message';
//可用
const STATUS_ENABLED = 1;
//不可用
const STATUS_DISABLED = 0;
/**
* 初始化模板消息
*/
public function init()
{
//array getAllTemplates() 获取所有模板列表
//已经设置的则更新status 为 可用
//未更新则string addTemplate($shortId) 添加模板并获取模板ID
//将模板ID更新到数据库
}
public function getAllTemplates()
{
return static::where('parent_item','')->get();
}
/**
* 发送模板消息
*/
public function send($item, $openid, $data)
{
}
public function getTemplateByItem($item)
{
}
/**
* 添加模板消息
*/
public function add()
{
}
/**
* 修改模板消息
*/
public function edit()
{
}
}