开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
7 Star 85 Fork 46

APIJSON/APIJSON-Demo

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (1)
标签 (35)
master
7.1.0
7.1.5
7.0.3
6.2.0
6.0.0
5.4.0
5.3.0
5.2.5
5.2.0
5.1.5
5.1.0
5.0.0
4.9.1
4.8.3
4.8.0
4.7.3
4.7.2
4.7.1
4.7.0
4.6.7
master
分支 (1)
标签 (35)
master
7.1.0
7.1.5
7.0.3
6.2.0
6.0.0
5.4.0
5.3.0
5.2.5
5.2.0
5.1.5
5.1.0
5.0.0
4.9.1
4.8.3
4.8.0
4.7.3
4.7.2
4.7.1
4.7.0
4.6.7
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1)
标签 (35)
master
7.1.0
7.1.5
7.0.3
6.2.0
6.0.0
5.4.0
5.3.0
5.2.5
5.2.0
5.1.5
5.1.0
5.0.0
4.9.1
4.8.3
4.8.0
4.7.3
4.7.2
4.7.1
4.7.0
4.6.7
APIJSON-Demo
/
PostgreSQL
/
postgres_sys_ddl.sql
APIJSON-Demo
/
PostgreSQL
/
postgres_sys_ddl.sql
postgres_sys_ddl.sql 11.43 KB
一键复制 编辑 原始数据 按行查看 历史
TommyLemon 提交于 2023年01月30日 18:33 +08:00 . PostgreSQL:更新表
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
create table "Praise"
(
);
alter table "Praise"
owner to postgres;
create table "Random"
(
);
alter table "Random"
owner to postgres;
create table "_Visit"
(
);
alter table "_Visit"
owner to postgres;
create table "Method"
(
);
alter table "Method"
owner to postgres;
create table "Document"
(
id bigint,
debug smallint,
"userId" bigint,
"testAccountId" bigint,
version smallint,
name varchar(100),
type varchar(5),
url varchar(250),
request text,
apijson text,
sqlauto text,
standard text,
header text,
date timestamp,
detail text
);
alter table "Document"
owner to postgres;
create table apijson_privacy
(
id bigint not null
primary key,
certified smallint not null,
phone varchar(64) not null,
balance numeric(10, 2) not null,
_password varchar(20) not null,
"_payPassword" varchar(32) not null
);
comment on table apijson_privacy is '用户隐私信息表。\n对安全要求高,不想泄漏真实名称。对外名称为 Privacy';
comment on column apijson_privacy.id is '唯一标识';
comment on column apijson_privacy.certified is '已认证';
comment on column apijson_privacy.phone is '手机号,仅支持 11 位数的。不支持 +86 这种国家地区开头的。如果要支持就改为 VARCHAR(14)';
comment on column apijson_privacy.balance is '余额';
comment on column apijson_privacy._password is '登录密码';
comment on column apijson_privacy."_payPassword" is '支付密码';
alter table apijson_privacy
owner to postgres;
create index "phone_UNIQUE"
on apijson_privacy (phone);
create table apijson_user
(
id bigint not null
primary key,
sex smallint not null,
name varchar(20),
tag varchar(45),
head varchar(300),
"contactIdList" jsonb,
"pictureList" jsonb,
date timestamp(6)
);
comment on table apijson_user is '用户公开信息表。对安全要求高,不想泄漏真实名称。对外名称为 User';
comment on column apijson_user.id is '唯一标识';
comment on column apijson_user.sex is '性别:
0-男
1-女';
comment on column apijson_user.name is '名称';
comment on column apijson_user.tag is '标签';
comment on column apijson_user.head is '头像url';
comment on column apijson_user."contactIdList" is '联系人id列表';
comment on column apijson_user."pictureList" is '照片列表';
comment on column apijson_user.date is '创建日期';
alter table apijson_user
owner to postgres;
create table "Comment"
(
id bigint not null
primary key,
"toId" bigint default 0 not null,
"userId" bigint not null,
"momentId" bigint not null,
date timestamp(6),
content varchar(1000) not null
);
comment on table "Comment" is '评论';
comment on column "Comment".id is '唯一标识';
comment on column "Comment"."toId" is '被回复的id';
comment on column "Comment"."userId" is '评论人id';
comment on column "Comment"."momentId" is '动态id';
comment on column "Comment".date is '创建日期';
comment on column "Comment".content is '内容';
alter table "Comment"
owner to postgres;
create table "Moment"
(
id bigint not null
primary key,
"userId" bigint not null,
date timestamp(6),
content varchar(300),
"praiseUserIdList" jsonb not null,
"pictureList" jsonb not null
);
comment on table "Moment" is '动态';
comment on column "Moment".id is '唯一标识';
comment on column "Moment"."userId" is '用户id';
comment on column "Moment".date is '创建日期';
comment on column "Moment".content is '内容';
comment on column "Moment"."praiseUserIdList" is '点赞的用户id列表';
comment on column "Moment"."pictureList" is '图片列表';
alter table "Moment"
owner to postgres;
create table "TestRecord"
(
id bigint not null
primary key,
"userId" bigint not null,
"documentId" bigint not null,
response text not null,
date timestamp(6) default CURRENT_TIMESTAMP not null,
compare text,
standard text,
"randomId" bigint default 0,
headless smallint default 0 not null,
"reportId" bigint default 0 not null,
"testAccountId" bigint default 0 not null,
duration bigint default 0 not null,
"minDuration" bigint default 0 not null,
"maxDuration" bigint default 0 not null,
host varchar(200)
);
comment on column "TestRecord".id is '唯一标识';
comment on column "TestRecord"."userId" is '用户id';
comment on column "TestRecord"."documentId" is '测试用例文档id';
comment on column "TestRecord".response is '接口返回结果JSON';
comment on column "TestRecord".date is '创建日期';
comment on column "TestRecord".compare is '对比结果';
comment on column "TestRecord".standard is 'response 的校验标准,是一个 JSON 格式的 AST ,描述了正确 Response 的结构、里面的字段名称、类型、长度、取值范围 等属性。';
comment on column "TestRecord"."randomId" is '随机配置 id';
comment on column "TestRecord".headless is '是否为无 UI 的 Headless 模式:0-否 1-是';
comment on column "TestRecord"."reportId" is '测试报告 ID';
comment on column "TestRecord"."testAccountId" is '测试账号 id';
alter table "TestRecord"
owner to postgres;
create table "Function"
(
id bigint not null
primary key,
language varchar,
name varchar(30) not null,
"returnType" varchar(45) default 'Object'::character varying,
arguments varchar(100),
demo text not null,
detail varchar(1000),
date timestamp(6) default CURRENT_TIMESTAMP not null,
"userId" bigint default 0,
version integer default 0,
tag varchar,
methods varchar,
return integer
);
comment on column "Function".language is '语言:Java(java), JavaScript(js), Lua(lua), Python(py), Ruby(ruby), PHP(php) 等,NULL 默认为 Java,JDK 1.6-11 默认支持 JavaScript,JDK 12+ 需要额外依赖 Nashron/Rhiro 等 js 引擎库,其它的语言需要依赖对应的引擎库,并在 ScriptEngineManager 中注册';
comment on column "Function".name is '方法名';
comment on column "Function"."returnType" is '返回类型';
comment on column "Function".arguments is '参数列表,每个参数的类型都是 String。
用 , 分割的字符串 比 [JSONArray] 更好,例如 array,item ,更直观,还方便拼接函数。';
comment on column "Function".demo is '可用的示例。';
comment on column "Function".detail is '详细描述';
comment on column "Function".date is '创建时间';
comment on column "Function"."userId" is '用户id';
comment on column "Function".version is '允许的最低版本号,只限于GET,HEAD外的操作方法。\nTODO 使用 requestIdList 替代 version,tag,methods';
comment on column "Function".tag is '允许的标签.\nnull - 允许全部\nTODO 使用 requestIdList 替代 version,tag,methods';
comment on column "Function".methods is '允许的操作方法。\nnull - 允许全部\nTODO 使用 requestIdList 替代 version,tag,methods';
comment on column "Function".return is '返回值示例';
alter table "Function"
owner to postgres;
create table "Request"
(
id bigint,
debug smallint,
version smallint,
method varchar(10),
tag varchar(30),
structure json,
detail varchar(10000),
date timestamp
);
alter table "Request"
owner to postgres;
create table "Script"
(
id bigint,
"userId" bigint,
"testAccountId" bigint,
"documentId" bigint,
simple smallint,
ahead smallint,
title varchar(100),
name varchar(100),
script text,
date timestamp,
detail varchar(1000)
);
alter table "Script"
owner to postgres;
create table "Access"
(
id integer not null
primary key,
schema varchar(100) default NULL::character varying,
debug integer default 0 not null,
name varchar(50) default '实际表名,例如 apijson_user'::character varying not null,
alias text,
get text default '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]'::text not null,
head text default '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]'::text not null,
gets text default '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]'::text not null,
heads text default '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]'::text not null,
post text default '["OWNER", "ADMIN"]'::text not null,
put text default '["OWNER", "ADMIN"]'::text not null,
delete text default '["OWNER", "ADMIN"]'::text not null,
date text default CURRENT_TIMESTAMP not null,
detail text
);
comment on column "Access".id is '唯一标识';
comment on column "Access".debug is '是否为调试表,只允许在开发环境使用,测试和线上环境禁用';
comment on column "Access".alias is '外部调用的表别名,例如 User';
comment on column "Access".get is '允许 get 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]
用 JSON 类型不能设置默认值,反正权限对应的需求是明确的,也不需要自动转 JSONArray。
TODO: 直接 LOGIN,CONTACT,CIRCLE,OWNER 更简单,反正是开发内部用,不需要复杂查询。';
comment on column "Access".head is '允许 head 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]';
comment on column "Access".gets is '允许 gets 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]';
comment on column "Access".heads is '允许 heads 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]';
comment on column "Access".post is '允许 post 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]';
comment on column "Access".put is '允许 put 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]';
comment on column "Access".delete is '允许 delete 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]';
comment on column "Access".date is '创建时间';
alter table "Access"
owner to postgres;
create table "Verify"
(
id bigint,
type integer,
phone bigint,
verify integer,
date timestamp
);
alter table "Verify"
owner to postgres;
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

腾讯 APIJSON 各种语言、各种框架 的 使用示例项目、上手文档、测试数据 SQL 文件 等。原仓库见
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/APIJSON/APIJSON-Demo.git
git@gitee.com:APIJSON/APIJSON-Demo.git
APIJSON
APIJSON-Demo
APIJSON-Demo
master
点此查找更多帮助

搜索帮助

仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /