<?php
/**
 * 系统推送消息
 * Created by PhpStorm.
 * User: phperstar
 * Date: 2021/05/07
 * Time: 15:09
 */

namespace JinDouYun\Dao\System;

use JinDouYun\Dao\BaseDao;

class DSystemPushMessage extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'system_push_message';
        $this->_primary = 'id';
        $this->_fields = [
            'id',  //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
            'name',  //char(50) NOT NULL COMMENT '通知名称',
            'type',  //tinyint(3) NOT NULL COMMENT '通知类型 1交易物流 2营销关怀',
            'tid',
            'kidList',
            'weixinTemplate',  //text NOT NULL COMMENT '订阅消息模板内容',
            'smsTemplate',  //text NOT NULL COMMENT '短信模板内容',
            'deleteStatus',
            'createTime',  //int(10) DEFAULT NULL COMMENT '创建时间',
            'updateTime',  //int(10) DEFAULT NULL COMMENT '修改时间',
            'extend',  //json DEFAULT NULL COMMENT '扩展字段',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}