/*
 * @Author: YKH
 * @Date: 2021-12-11 21:36:52
 * @LastEditTime: 2022-01-13 14:36:05
 * @Description: 
 * @FilePath: \cool-admin\cool-admin-midway-master\src\app\modules\shuyou\service\send_content.ts
 */
import { Provide } from '@midwayjs/decorator';
import { BaseService } from 'midwayjs-cool-core';
import * as _ from 'lodash';
import { InjectEntityModel } from '@midwayjs/orm';
import { ShuyouSendContentEntity } from '../entity/send_content';
import { Repository } from 'typeorm';

@Provide()
export class ShuyouSendContentService extends BaseService {

  @InjectEntityModel(ShuyouSendContentEntity)
  ShuyouSendContentEntity: Repository<ShuyouSendContentEntity>;



  /**
   * 保存机器人发送的消息
   * @param {*} entity
   * @memberof ShuyouSendContentService
   */
  async insert(entity) {
    await this.ShuyouSendContentEntity
      .createQueryBuilder()
      .insert()
      .into(ShuyouSendContentEntity)
      .values(entity)
      .execute();
    // console.log(res)
  }


}

//=====================