Spring 如何将地图字段添加到数据库?

Spring 如何将地图字段添加到数据库?,spring,postgresql,Spring,Postgresql,我试图创建一个包含此类字段的表,但我不知道如何在postgresql中添加类型为map的字段(名称和url) public class RequestToPlanfix { private String cmd; private String providerId; private String channel; private String chatId; private String planfix_token; private String message; private String

我试图创建一个包含此类字段的表,但我不知道如何在postgresql中添加类型为map的字段(名称和url)

public class RequestToPlanfix {
private String cmd;
private String providerId;
private String channel;
private String chatId;
private String planfix_token;
private String message;
private String title;
private String contactId;
private String contactName;
private String contactLastName;
private String contactIco;
private String contactEmail;
private String contactPhone;
private String contactData;
@Convert(converter = Attachments.class)
private Map<String,String> name;
@Convert(converter = Attachments.class)
private Map<String,String> url;
private Boolean isEcho;


CREATE TABLE "requestToPlanfix" (
id     SERIAL UNIQUE PRIMARY KEY ,
cmd    TEXT NOT NULL,
providerId TEXT NOT NULL,
channel TEXT NOT NULL,
chatId TEXT NOT NULL,
planfix_token TEXT NOT NULL,
message TEXT NOT NULL,
title TEXT NOT NULL,
contactId TEXT NOT NULL,
contactName TEXT NOT NULL,
contactLastName TEXT NOT NULL,
contactIco TEXT NOT NULL,
contactEmail TEXT NOT NULL,
contactPhone TEXT NOT NULL,
contactData TEXT NOT NULL,
name
url
公共类RequestToPlanfix{
私有字符串cmd;
私有字符串提供者ID;
专用字符串通道;
私有字符串chatId;
私有字符串planfix_令牌;
私有字符串消息;
私有字符串标题;
私有字符串联系人ID;
私有字符串contactName;
私有字符串contactLastName;
私有字符串contactIco;
私人字符串联系人电子邮件;
私用线控电话;
私有字符串数据;
@转换(转换器=附件.class)
私有地图名称;
@转换(转换器=附件.class)
私有地图url;
私有布尔isEcho;
创建表“requestToPlanfix”(
id序列唯一主键,
cmd文本不为空,
providerId文本不为空,
频道文本不为空,
chatId文本不为空,
planfix_标记文本不为空,
消息文本不为空,
标题文本不为空,
contactId文本不为空,
contactName文本不为空,
contactLastName文本不为空,
contactIco文本不为空,
联系人电子邮件文本不为空,
contactPhone文本不为空,
contactData文本不为空,
名称
网址
)

也就是说,我不知道如何将类型字段写入名称,url是映射,例如cmd text not null