Skip to content

Latest commit

 

History

History
132 lines (86 loc) · 1.78 KB

DATABASE.md

File metadata and controls

132 lines (86 loc) · 1.78 KB

数据库相关表说明

user表

名字 类型

sex text性别

age int年龄

birthday text生日

favorite text喜爱

hate text讨厌

password text密码

username text用户名 用于登录

nickname text昵称

friendlist text好友列表

follow text特别关心

fans text粉丝

sign text个性签名

tId int4(主键)int型Id

headPicture text头像

SQL

CREATE TABLE public."users" ( sex TEXT, age INT, birthday TEXT, favorite TEXT, hate TEXT, password TEXT, userName TEXT, nickName TEXT, friendList TEXT, follow TEXT, fans TEXT, sign TEXT, trueId INT PRIMARY KEY, headPicture TEXT );

shop表

location text经纬度坐标

inRank text所在排行榜

subType text食物类型分类

tel text电话

star double评星

avgPrice double平均价格

tastep double口味评分

enviornmentp double环境评分

servicep double服务评分

mainType text商圈

address text详细地址

signId text申请Id

stId int4(主键)int型Id

SQL

CREATE TABLE public.shop ( location TEXT, inRank TEXT, subType TEXT, tel TEXT, star double, avgPrice double, tastep double, enviornmentp double, servicep double, mainType TEXT, address TEXT, shopName TEXT, signId TEXT, shopTrueId INT PRIMARY KEY );

coment 表

comment int评论id shopid int商家id userid int用户id commentbody text评论内容 score int评分 time text时间

SQL

CREATE TABLE public.comment ( commentId INT PRIMARY KEY, shopId INT, userId INT, commentBody TEXT, score INT, time TEXT );

user表新增消息字段

ALTER TABLE public.users ADD message TEXT NULL;