https://github.com/phuc-create/go-simple-crud
https://github.com/phuc-create/go-simple-crud
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/phuc-create/go-simple-crud
- Owner: phuc-create
- Created: 2023-04-07T08:13:11.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-13T06:19:01.000Z (over 2 years ago)
- Last Synced: 2025-12-18T13:50:35.982Z (6 months ago)
- Language: Go
- Size: 611 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### CRUD APP GOLANG
Dependencies injected in Project
- DB => Repository
- Repository => Controller
- Controller => Handler
### Reference about table creation
```sql```
```
CREATE TABLE IF NOT EXISTS vendors
(
id BIGINT PRIMARY KEY,
plant TEXT NOT NULL CONSTRAINT vendors_plant_check CHECK (plant <> ''::TEXT),
status TEXT NOT NULL CONSTRAINT vendors_status_check CHECK (status <> ''::TEXT),
vendor_no TEXT NOT NULL CONSTRAINT vendors_vendor_no_check CHECK (vendor_no <> ''::TEXT),
vendor_name TEXT,
storage_location TEXT,
company_code TEXT,
purch_org TEXT,
uen_no TEXT,
email TEXT,
address TEXT,
phone_number TEXT,
contact_person_firstname TEXT,
contact_person_lastname TEXT,
sap_is_posting_blocked BOOLEAN DEFAULT FALSE NOT NULL,
sap_is_purchasing_blocked BOOLEAN DEFAULT FALSE NOT NULL,
sap_is_flins_deleted BOOLEAN DEFAULT FALSE NOT NULL,
sap_is_vmi_confirmed BOOLEAN DEFAULT FALSE NOT NULL,
sap_is_vmi_temp_blocked BOOLEAN DEFAULT FALSE NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
UNIQUE (vendor_no)
);
CREATE INDEX IF NOT EXISTS vendors_vendor_no_index ON vendors(vendor_no);
CREATE INDEX IF NOT EXISTS vendors_storage_location_index ON vendors(storage_location);
```