search

Home  >  Q&A  >  body text

mysql - 微信关键词自动回复数据库设计

我们先看下需求,然后再看图,
请问大家,这个数据库怎么设计?

需求分析

规则名:最多60字
关键词:可以添加多个,每个关键词都有完全匹配和未完全匹配选项
回复:回复可以是文字、图片、语音、视频、单图文、多图文、单商品、多商品内容类型,可以选择多条内容类型,也可以选择一条。另外,选择“回复全部”则发送多条信息,未选择“回复全部”则从多条信息中随机发送一条

PHPzPHPz2883 days ago786

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-04-17 11:40:13

    Oh, I just saw it. After a brief analysis, the data table design should be as follows
    1. Rule table weixin_rule
    No.rid
    Rule name rule_name
    Reply rule reply_rule 0Reply one randomly, 1Reply all

    2. Keyword table weixin_keywords
    No. kid
    Keywordkeyword
    Belonging rule rule_id

    3. Reply content table weixin_replays
    No.aid
    Reply content type type 1 Text 2 Picture 3 Voice 4 Video 5 Picture and text 6 Music 7 Link 8 Map
    Reply content content
    Belonging rule rule_id

    reply
    0
  • Cancelreply