{"id":17356753,"url":"https://github.com/thujuli/car_auction_design","last_synced_at":"2025-03-27T15:35:21.456Z","repository":{"id":233384033,"uuid":"628643894","full_name":"thujuli/car_auction_design","owner":"thujuli","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-16T15:49:51.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T19:23:38.419Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thujuli.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-16T15:35:45.000Z","updated_at":"2023-04-16T15:39:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"939e5d67-a457-4135-af2c-22c775a25cfa","html_url":"https://github.com/thujuli/car_auction_design","commit_stats":null,"previous_names":["thujuli/car_auction_design"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thujuli%2Fcar_auction_design","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thujuli%2Fcar_auction_design/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thujuli%2Fcar_auction_design/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thujuli%2Fcar_auction_design/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thujuli","download_url":"https://codeload.github.com/thujuli/car_auction_design/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245872567,"owners_count":20686409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T18:58:30.279Z","updated_at":"2025-03-27T15:35:21.435Z","avatar_url":"https://github.com/thujuli.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 1. Mission Statement\n- Menjadi wadah pertemuan antara penjual dan pembeli mobil \n- Mempermudah pembeli memilih mobil sesuai dengan iklan yang tersedia\n- Mempermudah mengelola penawaran mobil dari pembeli\n\n## 2. Creating Table Structures\n| Nama Tabel | Deskripsi |\n|:-|:-|\n| cities | Menyimpan informasi batasan kota-kota yang tersedia |\n| sellers | Menyimpan informasi tentang data diri seller |\n| customers | Menyimpan informasi tentang data customer |\n| products | Menyimpan informasi tentang product (mobil) yang dijual oleh seller |\n| ads | Menyimpan informasi iklan tentang product yang dijual |\n| bids | Menyimpan informasi penawaran harga yang dilakukan customers |\n\n### 2.1 Creating Field Name and Data Type\n#### Table: cities\n| Field: Data Type | Keterangan | Key |\n|:-|:-|:-|\n| city_id: int | Menyimpan informasi id kota | **PK** |\n| name: varchar(255) | Menyimpan informasi nama kota |\n| longitude: numeric | Menyimpan informasi kordinat garis bujur |\n| latitude: numeric | Menyimpan informasi kordinat garis lintang |\n\n#### Table: sellers\n| Field: Data Type | Keterangan | Key |\n|:-|:-|:-|\n| seller_id: int | Menyimpan informasi id seller | **PK** |\n| city_id: int | Menyimpan informasi id kota | **FK** |\n| first_name: varchar(255) | Menyimpan informasi nama depan seller |\n| last_name: varchar(255) | Menyimpan informasi nama belakang seller |\n| phone: varchar(20) | Menyimpan informasi phone number seller | **AK** |\n\n#### Table: customers\n| Field: Data Type | Keterangan | Key |\n|:-|:-|:-|\n| customer_id: int | Menyimpan informasi id customer | **PK** |\n| city_id: int | Menyimpan informasi id kota | **FK**|\n| first_name: varchar(255) | Menyimpan informasi nama depan customer |\n| last_name: varchar(255) | Menyimpan informasi nama belakang customer |\n| phone: varchar(20) | Menyimpan informasi phone number customer | **AK** |\n\n#### Table: products\n| Field: Data Type | Keterangan | Key |\n|:-|:-|:-|\n| product_id: int | Menyimpan informasi id mobil | **PK** |\n| brand: varchar(100) | Menyimpan informasi merek mobil |\n| model: varchar(100) | Menyimpan informasi model mobil |\n| body_type: varchar(100) | Menyimpan informasi jenis body mobil |\n| year: smallint | Menyimpan informasi tahun keluaran mobil |\n| price: numeric | Menyimpan informasi harga mobil |\n\n#### Table: ads\n| Field: Data Type | Keterangan | Key |\n|:-|:-|:-|\n| ad_id: int | Menyimpan informasi id iklan | **PK** |\n| seller_id: int | Menyimpan informasi id seller | **FK** |\n| product_id: int | Menyimpan informasi id product | **FK** |\n| title: varchar(255) | Menyimpan informasi judul iklan | \n| description: text | Menyimpan deskripsi tambahan tentang product |\n| date_post: date | Menyimpan informasi postingan iklan |\n| is_bid: boolean | Menyimpan infromasi apakah mobil bisa ditawar | \n\n#### Table: bids\n| Field: Data Type | Keterangan | Key |\n|:-|:-|:-|\n| bid_id: int | Menyimpan informasi id bid | **PK** |\n| ad_id: int | Menyimpan informasi id iklan | **FK** |\n| customer_id: int | Menyimpan informasi id customer | **FK** |\n| date_bid: date | Menyimpan informasi tanggal bid |\n| price_bid: numeric | Menyimpan informasi penawaran harga |\n| status_bid: varchar(20) | Menyimpan informasi status bid |\n\n## 3. Determine Table Relationships\n### 3.1 Identifying Relationship\n|  |cities | sellers | customers | products | ads | bids |\n|-|:-|:-:|:-:|:-:|:-:|:-:|\n| **cities** |  | 1:N | 1:N |  |  |  |\n| **sellers** |  |  |  |  | 1:N |  |\n| **customers** |  |  |  |  |  | 1:N |\n| **products** |  |  |  |  | 1:N |  |\n| **ads** |  |  |  |  |  | 1:N |\n| **bids**|  |  |  |  |  |  |\n\n### 3.2 Entity Relationship Diagram\n![car auction design erd](schema/car_auction-erd.png)\n\n##  4. Determine Business Rules\n### Table: cities\n#### Business Rules\n- Primary key **tidak** bersifat auto increment\n- Informasi pada table cities harus lengkap\n\n#### Constraint\n- **NOT NULL** pada field:\n - name: varchar(255)\n - longitute: numeric\n - latitude: numeric\n  \n### Table: sellers\n#### Business Rules\n- Primary key bersifat auto increment\n- Informasi pada table sellers harus lengkap\n\n#### Constraint\n- seller_id: int generated by default as identity\n- **NOT NULL** pada field:\n    - city_id: int\n    - first_name: varchar(255)\n    - last_name: varchar(255)\n    - phone: varchar(20)\n\n### Table: customers\n#### Business Rules\n- Primary key bersifat auto increment\n- Informasi pada table customers harus lengkap\n\n#### Constraint\n- customer_id: int generated by default as identity\n- **NOT NULL** pada field:\n   - city_id: int\n   - first_name: varchar(255)\n   - last_name: varchar(255)\n   - phone: varchar(20)\n \n### Table: products\n#### Business Rules\n- Primary key bersifat auto increment\n- Informasi pada table products harus lengkap\n- Nilai pada price harus lebih dari 0\n\n#### Constraint\n- product_id: int generated by default as identity\n- **NOT NULL** pada field:\n   - brand: varchar(100)\n   - model: varchar(100)\n   - body_type: varchar(100)\n   - year: smallint\n   - price: numeric\n- **CHECK** pada field price \u003e 0\n\n### Table: ads\n#### Business Rules\n- Primary key bersifat auto increment\n- Informasi pada table ads harus terisi, kecuali description\n- Nilai is_bid default TRUE\n\n#### Constraint\n- ad_id: int generated by default as identity\n- **NOT NULL** pada field:\n   - seller_id: int\n   - product_id: int\n   - title: varchar(255)\n   - date_post: date\n   - is_bid: boolean\n- **DEFAULT** is_bid TRUE\n\n### Table: bids\n#### Business Rules\n- Primary key bersifat auto increment\n- Informasi pada table bids harus lengkap\n- Nilai status_bid default Sent\n- Nilai status_bid harus Sent/Cancelled\n- Nilai price_bid harus lebih dari 0\n\n#### Constraint\n- bid_id: int generated by default as identity\n- **NOT NULL** pada field:\n   - ad_id: int\n   - customer_id: int\n   - date_bid: date\n   - price_bid: numeric\n   - status_bid: varchar(20)\n- **DEFAULT** status_bid 'Sent'\n- **CHECK** status_bid in ('Sent','Cancelled')\n- **CHECK** pada field price_bid \u003e 0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthujuli%2Fcar_auction_design","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthujuli%2Fcar_auction_design","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthujuli%2Fcar_auction_design/lists"}