aboutsummaryrefslogtreecommitdiff
path: root/src/schema.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-12-24 05:21:40 +0000
committerAkshay <[email protected]>2020-12-24 05:21:40 +0000
commit9d2b6ee10ec5359cc91769d430485c8c869ba1a8 (patch)
treeb2d541e575ab6e3f70cb709f156f06afca085881 /src/schema.rs
parent7c65421328552b08e64df25e224fe9d54d363e6e (diff)
monorepo
Diffstat (limited to 'src/schema.rs')
-rw-r--r--src/schema.rs61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/schema.rs b/src/schema.rs
deleted file mode 100644
index f08221a..0000000
--- a/src/schema.rs
+++ /dev/null
@@ -1,61 +0,0 @@
1table! {
2 cart_items (cart_id, product_id) {
3 cart_id -> Integer,
4 product_id -> Integer,
5 }
6}
7
8table! {
9 customer (id) {
10 id -> Integer,
11 username -> Varchar,
12 password -> Varchar,
13 phone_number -> Varchar,
14 email_id -> Varchar,
15 address -> Nullable<Text>,
16 }
17}
18
19table! {
20 product (id) {
21 id -> Integer,
22 name -> Varchar,
23 kind -> Nullable<Varchar>,
24 price -> Float,
25 description -> Nullable<Varchar>,
26 }
27}
28
29table! {
30 rating (id) {
31 id -> Integer,
32 comment_text -> Nullable<Text>,
33 comment_date -> Nullable<Date>,
34 product_id -> Nullable<Integer>,
35 customer_id -> Nullable<Integer>,
36 stars -> Nullable<Integer>,
37 }
38}
39
40table! {
41 transaction (id) {
42 id -> Integer,
43 payment_type -> Varchar,
44 amount -> Float,
45 customer_id -> Nullable<Integer>,
46 }
47}
48
49joinable!(cart_items -> customer (cart_id));
50joinable!(cart_items -> product (product_id));
51joinable!(rating -> customer (customer_id));
52joinable!(rating -> product (product_id));
53joinable!(transaction -> customer (customer_id));
54
55allow_tables_to_appear_in_same_query!(
56 cart_items,
57 customer,
58 product,
59 rating,
60 transaction,
61);