Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table chat_rooms
- (
- id bigserial not null
- constraint chat_rooms_pkey
- primary key,
- name varchar(255) not null,
- owner_id int not null
- )
- ;
- create table chat_members
- (
- id bigserial not null
- constraint chat_members_pkey
- primary key,
- user_id integer not null,
- room_id integer not null
- )
- ;
- create table chat_comments
- (
- id bigserial not null
- body text,
- user_id integer not null,
- room_id integer
- )
- ;
- -- REST Example
- --
- -- GET /chat?room_id=<room_id> -- 一覧(検索)
- -- GET /chat/:room_id -- チャット内容表示
- -- POST /chat/:room_id -- 投稿
- -- GET /chat/:room_id/members -- チャットメンバー
- -- PUT /chat/:comment_id -- 投稿変更
- -- DELETE /chat/:comment_id -- 投稿削除
Add Comment
Please, Sign In to add comment