nnnngo / mercari-build-training-2022 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mercari-build/mercari-build-training
This project forked from mercari-build/mercari-build-training
カラム名 | 型 | 詳細 |
---|---|---|
id | int(PRIMARY KEY) | ID |
item_id | int(FOREIGN KEY) | 商品のID |
question | string | 質問 |
answer | string | 回答 |
qa_type_id | int(FOREIGN KEY) | 質問種別のID |
create table qas(
id integer primary key autoincrement,
foreign key (item_id) REFERENCES items(id) ON DELETE CASCADE,
question text,
answer text,
foreign key (qa_type_id) REFERENCES qa_type(id) ON DELETE CASCADE
);
カラム名 | 型 | 詳細 |
---|---|---|
id | int(PRIMARY KEY) | ID |
label | string | 種別に対するラベル(initial_message, about_items) |
create table qa_type(
id integer primary key autoincrement,
label text
);
path | HTTP Method | 詳細 |
---|---|---|
/users | POST | name(string)とpassword(string)を受け取って、UserをDBにINSERTする. |
/users/:id | GET | id(int)をパラメータとして受け取り、{ "id": int , "name" : string } のJSONを返す. |
id | name | password |
---|---|---|
int | string | string |
create table users(
id integer primary key autoincrement,
name string not null unique,
password string
);
カラム名 | 型 | 詳細 |
---|---|---|
id | int(PRIMARY KEY) | ID |
name | string | 商品名 |
image | string | 画像URL |
price | int | 値段(円) |
price_lower_limit | int | 商品値下げの下限 |
user_id | int(FOREIGN KEY) | 出品者のID |
create table items(
id integer primary key autoincrement,
name text,
image text,
price_lower_limit int,
foreign key (user_id) REFERENCES users(id) ON DELETE CASCADE
);
商品登録の際に金額等の情報も登録できるようにする
カラム名 | 型 | 詳細 |
---|---|---|
id | int(PRIMARY KEY) | ID |
item_id | int(FOREIGN KEY) | 取引対象になる商品のID |
buyer_id | int(FOREIGN KEY) | 買い手のID |
transaction_status_id | int(FOREIGN KEY) | 取引がどの段階にあるかを表すデータのID |
determined_price | int | 値引き処理によって確定された値段 |
create table transactions(
id integer primary key autoincrement,
determined_price integer,
foreign key (item_id) REFERENCES items(id) ON DELETE CASCADE,
foreign key (buyer_id) REFERENCES users(id) ON DELETE CASCADE,
foreign key (transaction_status_id) REFERENCES transaction_statuses(id) ON DELETE CASCADE
);
カラム名 | 型 | 詳細 |
---|---|---|
id | int(PRIMARY KEY) | ID |
name | string | 状態の名称 |
create table transaction_statuses(
id integer primary key autoincrement,
name text
);
id | name |
---|---|
int | string |
create table users(
id integer primary key autoincrement,
name text
);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.