Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #48

Open
wants to merge 145 commits into
base: sandhya
Choose a base branch
from
Open

Test #48

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
9e40389
test
RavitaNRL Nov 24, 2023
7357497
test
RavitaNRL Nov 24, 2023
2769815
test
RavitaNRL Nov 24, 2023
04eb6dc
Merge branch 'Ravita' into Ravita
RavitaNRL Nov 24, 2023
1dfe3dd
Merge pull request #2 from RavitaNRL/Ravita
RavitaNRL Nov 24, 2023
1c31f03
test
RavitaNRL Nov 24, 2023
59811f7
Merge branch 'Ravita' of https://github.com/RavitaNRL/Capstone-3 into…
RavitaNRL Nov 24, 2023
3834314
Merge pull request #3 from RavitaNRL/Ravita
RavitaNRL Nov 24, 2023
83283a8
test
rezapace Nov 24, 2023
9414408
Merge pull request #6 from rezapace/main
rezapace Nov 24, 2023
ffda6b9
test2
rezapace Nov 24, 2023
32114c3
Merge pull request #7 from rezapace/main
rezapace Nov 24, 2023
d315263
update readme.md
rezapace Nov 25, 2023
0df8600
Merge pull request #8 from rezapace/main
rezapace Nov 25, 2023
2cf9e9d
update readme.md
rezapace Nov 25, 2023
8e8da90
Merge pull request #9 from rezapace/main
rezapace Nov 25, 2023
eece18d
update Login
rezapace Nov 25, 2023
c286c71
Merge pull request #10 from rezapace/main
rezapace Nov 25, 2023
800cf69
update postman
rezapace Nov 25, 2023
7ca1bf1
update login register
rezapace Nov 26, 2023
ebcb377
Merge pull request #11 from rezapace/main
rezapace Nov 26, 2023
705743e
update notion
rezapace Nov 26, 2023
4d426fe
update postman
rezapace Nov 26, 2023
d1814c1
update postman dan regist roles
rezapace Nov 26, 2023
2b1052a
Merge pull request #12 from rezapace/main
rezapace Nov 26, 2023
f29b16b
Merge pull request #13 from Capstone-Mikti/Reza
rezapace Nov 26, 2023
e94bfad
update crud tiket
rezapace Nov 26, 2023
be23c09
update Searching Ticket
rezapace Nov 26, 2023
4d6da1d
Merge pull request #14 from rezapace/main
rezapace Nov 26, 2023
e58fdeb
Merge pull request #15 from Capstone-Mikti/Reza
rezapace Nov 26, 2023
663b545
update crud blog
rezapace Nov 26, 2023
33834a7
Merge pull request #16 from rezapace/main
rezapace Nov 26, 2023
fe96c2f
Merge pull request #17 from rezapace/main
rezapace Nov 26, 2023
83582fd
update link notion
rezapace Nov 26, 2023
6dba37c
Merge pull request #18 from rezapace/main
rezapace Nov 26, 2023
8b09543
Merge pull request #19 from rezapace/main
rezapace Nov 26, 2023
a0c19c9
update postman
rezapace Nov 27, 2023
f54a384
Merge pull request #20 from rezapace/main
rezapace Nov 27, 2023
e99d3d5
Merge pull request #22 from rezapace/main
rezapace Nov 27, 2023
c3afc34
update order
rezapace Nov 28, 2023
bf1b27e
update category
rezapace Nov 28, 2023
9d1b59a
Merge pull request #23 from rezapace/main
rezapace Nov 28, 2023
b342afc
update history ticket by id
rezapace Nov 28, 2023
ca5fc57
Merge pull request #24 from rezapace/main
rezapace Nov 28, 2023
0a6c603
update v2
rezapace Nov 28, 2023
3232bf2
Merge pull request #25 from rezapace/main
rezapace Nov 28, 2023
47faaf0
Merge pull request #26 from rezapace/main
rezapace Nov 28, 2023
e9c0200
Update README.md
RavitaNRL Nov 29, 2023
bc627cc
update readme md
RavitaNRL Nov 29, 2023
adce6db
update readme belahar
rezapace Nov 29, 2023
660115f
Merge pull request #27 from rezapace/main
rezapace Nov 29, 2023
a94f7e5
Merge branch 'Ravita' into main
rezapace Nov 29, 2023
d1ae4eb
Merge pull request #28 from rezapace/main
rezapace Nov 29, 2023
853ef87
update readme md
RavitaNRL Nov 29, 2023
97bd0f8
Merge branch 'Ravita' of https://github.com/Capstone-Mikti/Capstone-3…
RavitaNRL Nov 29, 2023
f9954fe
update readme belahar
rezapace Nov 29, 2023
98f4f2e
Merge branch 'main' of https://github.com/rezapace/Capstone-3
rezapace Nov 29, 2023
591dc11
Merge pull request #30 from rezapace/main
rezapace Nov 29, 2023
503a51e
Merge branch 'Reza' of https://github.com/Capstone-Mikti/Capstone-3 i…
RavitaNRL Nov 29, 2023
8f653e9
Update Roles
RavitaNRL Nov 29, 2023
8a9e3bc
Merge pull request #31 from Capstone-Mikti/Ravita
RavitaNRL Nov 29, 2023
7ced1ee
update comment di roles
RavitaNRL Nov 29, 2023
432f349
Merge pull request #32 from Capstone-Mikti/Ravita
RavitaNRL Nov 29, 2023
ab37525
reza
rezapace Nov 29, 2023
4360df5
Merge branch 'main' of https://github.com/rezapace/Capstone-3
rezapace Nov 29, 2023
eb3bd79
update reza role v2
rezapace Nov 29, 2023
8773682
Merge pull request #33 from rezapace/main
rezapace Nov 29, 2023
38eb715
Merge pull request #34 from Capstone-Mikti/Ravita
RavitaNRL Nov 29, 2023
946fdaa
update comment di roles v3
RavitaNRL Nov 29, 2023
888f0ea
update comment di roles v4
RavitaNRL Nov 29, 2023
3bb09d9
Merge pull request #35 from Capstone-Mikti/Ravita
RavitaNRL Nov 29, 2023
1630a33
update reza role v5
rezapace Nov 29, 2023
2488bf2
Merge pull request #36 from rezapace/main
rezapace Nov 29, 2023
4a4f844
update router dan db
RavitaNRL Nov 29, 2023
72fe52d
Merge pull request #37 from Capstone-Mikti/Ravita
RavitaNRL Nov 29, 2023
47d075f
update handler_user, repo_user, service_user, dan route
RavitaNRL Nov 29, 2023
203ed58
update user_handler
RavitaNRL Nov 29, 2023
d19bb26
update fitur tiket
RavitaNRL Nov 29, 2023
ebc8fb1
update route
RavitaNRL Nov 29, 2023
1be00a1
auth_handler, user_entity, ticket_handler, tiket_entity, user_handler
RavitaNRL Nov 29, 2023
afa3460
Merge branch 'Ravita' of https://github.com/Capstone-Mikti/Capstone-3
rezapace Nov 29, 2023
c199c83
update program untuk sort /filter
rezapace Nov 29, 2023
ea1f360
update readme
rezapace Nov 29, 2023
ad09fa7
update program untuk sort /filter
rezapace Nov 29, 2023
7779f39
Merge pull request #38 from Capstone-Mikti/reza
rezapace Nov 29, 2023
7338b6b
update program untuk sort /filter
rezapace Nov 29, 2023
799f871
update program untuk sort /filter
rezapace Nov 29, 2023
1f535f9
update program untuk sort /filter
rezapace Nov 30, 2023
605a14d
Menambahkan Field Tersisa di struct Tiket
RavitaNRL Nov 30, 2023
10f507c
memperbaiki koment
RavitaNRL Nov 30, 2023
20aaedd
update respon di get ticket by ID
RavitaNRL Nov 30, 2023
26dea5f
update respon di get ticket by ID
RavitaNRL Nov 30, 2023
56edeb9
update respon untuk create new order
RavitaNRL Nov 30, 2023
b33534b
update respon untuk create new order dan dibagian struct order
RavitaNRL Nov 30, 2023
e1e306f
update program untuk sort /filter
rezapace Nov 30, 2023
4362e45
update program push notification
rezapace Nov 30, 2023
d4c06d3
update topup
rezapace Nov 30, 2023
2d75732
update db
rezapace Nov 30, 2023
7f10918
update topup
rezapace Dec 1, 2023
2dd55fa
update tiket terjual
rezapace Dec 1, 2023
93fc5fe
update tiket saldo
rezapace Dec 1, 2023
7e10ef3
update tiket saldo
rezapace Dec 1, 2023
1c71a1c
update saldo
RavitaNRL Dec 1, 2023
4216193
update saldo
RavitaNRL Dec 1, 2023
f4b2c25
update saldo
RavitaNRL Dec 1, 2023
e667157
Merge branch 'Ravita' of https://github.com/Capstone-Mikti/Capstone-3…
RavitaNRL Dec 1, 2023
3a8c94a
update saldo
RavitaNRL Dec 1, 2023
9456d5d
update saldo
RavitaNRL Dec 1, 2023
8ab3cd7
update tiket saldo
rezapace Dec 1, 2023
f3d14b0
Merge branch 'main' into reza
rezapace Dec 1, 2023
ea1a475
Merge pull request #39 from Capstone-Mikti/reza
rezapace Dec 1, 2023
3488226
update tiket postman
rezapace Dec 1, 2023
cecc924
Merge branch 'reza' of https://github.com/Capstone-Mikti/Capstone-3 i…
rezapace Dec 1, 2023
10d5b07
update tiket roles
rezapace Dec 1, 2023
3ecc2f4
update tiket postman
rezapace Dec 1, 2023
8b08ff5
Merge pull request #40 from Capstone-Mikti/reza
rezapace Dec 1, 2023
8c1c80c
update tiket userprofile
rezapace Dec 2, 2023
2eeca08
Merge pull request #41 from Capstone-Mikti/reza
rezapace Dec 2, 2023
7b43c2f
update tiket userprofile
rezapace Dec 2, 2023
5779904
update tiket order history
rezapace Dec 3, 2023
5839112
update tiket order
rezapace Dec 3, 2023
98a2044
update tiket payment masih error
rezapace Dec 3, 2023
e6083d7
Merge pull request #42 from Capstone-Mikti/reza
rezapace Dec 3, 2023
7626b1b
update log out
rezapace Dec 4, 2023
fbaa935
Merge pull request #43 from Capstone-Mikti/reza
rezapace Dec 4, 2023
b13b017
update payment
rezapace Dec 4, 2023
d14c2e5
update ai
rezapace Dec 4, 2023
f3a0b3b
update ai
rezapace Dec 4, 2023
7e73c6d
Merge pull request #44 from Capstone-Mikti/reza
rezapace Dec 4, 2023
b33a159
update db
rezapace Dec 4, 2023
914ff46
update payment Mindtrans
rezapace Dec 5, 2023
2406711
Merge pull request #45 from Capstone-Mikti/reza
rezapace Dec 5, 2023
5c37d16
update payment Mindtrans
rezapace Dec 5, 2023
c15bed4
update payment Mindtrans
rezapace Dec 5, 2023
986a976
Merge pull request #46 from Capstone-Mikti/reza
rezapace Dec 5, 2023
196f6d1
update payment Mindtrans
rezapace Dec 6, 2023
e2c594f
Merge pull request #47 from Capstone-Mikti/reza
rezapace Dec 6, 2023
73c874b
update docker
rezapace Dec 7, 2023
24afeef
Merge pull request #49 from Capstone-Mikti/reza
rezapace Dec 7, 2023
e283119
update readme md
rezapace Dec 8, 2023
0bdd1ed
Merge pull request #50 from Capstone-Mikti/reza
rezapace Dec 8, 2023
7a28ab0
done
rezapace Dec 10, 2023
14d377c
Merge pull request #52 from Capstone-Mikti/reza
rezapace Dec 10, 2023
afc737d
done
rezapace Dec 11, 2023
da7e8ea
Merge pull request #53 from Capstone-Mikti/reza
rezapace Dec 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions %USERPROFILE%/go/bin/pkg/sumdb/sum.golang.org/latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
go.sum database tree
20857462
Kn0F1e8O8fQOl6YvfyegETTq1tmu1qpkfDZj5AtvhWI=

— sum.golang.org Az3gru8zyaj7EuaczqV+hDOTF+63AeV8mvhZHqRv6bbiV3gaYIvN9DnNHoSzVwNBCGSXS7qp50Ui6l9wNpxiJmNpwAc=
19 changes: 12 additions & 7 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
PORT=8080
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=mysecretpassword
POSTGRES_DATABASE=weather-app
JWT_SECRET_KEY="akusayangmantanku"
PORT=8080
ENV="development"
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=mysecretpassword
POSTGRES_DATABASE=Tiketing
JWT_SECRET_KEY=secret
MIDTRANS_CLIENT_KEY=""
MIDTRANS_SERVER_KEY=""


Binary file added Materi/erd.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Capstone-3: Aplikasi Backend Pemesanan Tiket

By : Reza
By : Golang - Kelompok 3
Anggota :
- [x] [Rio]
- [x] [Reza]
- [x] [Ravita]
- [x] [Rahma]
- [x] [Sandhya]

Dalam proyek capstone ini, tujuan utamanya adalah untuk memberikan pengalaman baru kepada peserta, serta mengimplementasikan Metode Scrum dalam pengembangan produk digital. Proyek ini akan dilakukan dalam bentuk kelompok dan fokus pada pengembangan bagian Back End.

Expand Down Expand Up @@ -52,9 +58,12 @@ Proyek ini akan berlangsung selama 2 sprint (2 minggu) dengan penilaian secara b
<!-- add picture readme md -->
![Figma](https://raw.githubusercontent.com/Capstone-Mikti/Capstone-3/main/Materi/flow%201.png)
![Figma](https://raw.githubusercontent.com/Capstone-Mikti/Capstone-3/main/Materi/flow%202.png)
![ERD](https://raw.githubusercontent.com/Capstone-Mikti/Capstone-3/main/Materi/erd.jpg)


<!-- add link url -->
- [x] [Figma](https://www.figma.com/file/BdDlFZ7u3E6upQlSwUcOax/Code-Challenge-Project-Based?type=whiteboard&node-id=0-1&t=Le6Pdip9Patyl5DV-0)
- [x] [PPT Document](https://docs.google.com/presentation/d/1vvOwCKjysLxORL7GOtOJbgiW3XAVuYsRK0ccUa8VOzA/edit#slide=id.g21e0640a876_0_25)
- [x] [Desain Aplikasi](https://www.figma.com/file/1MtWn0HIt9SidftaQIlrXG/Project-Coding-Challenge-References?type=design&node-id=0-4&mode=design&t=dC1tZcf7zlIMfZBL-0)
- [x] [Desain Aplikasi](https://www.figma.com/file/1MtWn0HIt9SidftaQIlrXG/Project-Coding-Challenge-References?type=design&node-id=0-4&mode=design&t=dC1tZcf7zlIMfZBL-0)
- [x] [Notion](https://pouncing-language-444.notion.site/15cb9b14d1cd47f4a355e8b7583b0857?v=e7c8616df95346d7af872d52aba69259&pvs=4)
- [x] [Postman](https://trello.com/b/6Z6ZQZ6Z/capstone-3)
222 changes: 122 additions & 100 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
@@ -1,100 +1,122 @@
package main

import (
"context"
"fmt"
"log"
"os"
"os/signal"
"strings"
"time"

"github.com/labstack/echo/v4"
"github.com/zhikariz/weather-app/internal/builder"
"github.com/zhikariz/weather-app/internal/config"
"github.com/zhikariz/weather-app/internal/http/binder"
"github.com/zhikariz/weather-app/internal/http/server"
"github.com/zhikariz/weather-app/internal/http/validator"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"gorm.io/gorm/logger"
)

func main() {
cfg, err := config.NewConfig(".env")
checkError(err)

splash()

db, err := buildGormDB(cfg.Postgres)
checkError(err)

publicRoutes := builder.BuildPublicRoutes(cfg, db)
privateRoutes := builder.BuildPrivateRoutes(cfg, db)

echoBinder := &echo.DefaultBinder{}
formValidator := validator.NewFormValidator()
customBinder := binder.NewBinder(echoBinder, formValidator)

srv := server.NewServer(
cfg,
customBinder,
publicRoutes,
privateRoutes,
)

runServer(srv, cfg.Port)

waitForShutdown(srv)
}

func runServer(srv *server.Server, port string) {
go func() {
err := srv.Start(fmt.Sprintf(":%s", port))
log.Fatal(err)
}()
}

func waitForShutdown(srv *server.Server) {
quit := make(chan os.Signal, 1)
signal.Notify(quit, os.Interrupt)

<-quit

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

go func() {
if err := srv.Shutdown(ctx); err != nil {
srv.Logger.Fatal(err)
}
}()
}

func buildGormDB(cfg config.PostgresConfig) (*gorm.DB, error) {
dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=disable TimeZone=Asia/Jakarta", cfg.Host, cfg.User, cfg.Password, cfg.Database, cfg.Port)
return gorm.Open(postgres.Open(dsn), &gorm.Config{
Logger: logger.Default.LogMode(logger.Info),
})
}

func splash() {
colorReset := "\033[0m"

splashText := `

__ __ __ .__ _____
/ \ / \ ____ _____ _/ |_| |__ ___________ / _ \ ______ ______
\ \/\/ // __ \\__ \\ __\ | \_/ __ \_ __ \/ /_\ \\____ \\____ \
\ /\ ___/ / __ \| | | Y \ ___/| | \/ | \ |_> > |_> >
\__/\ / \___ >____ /__| |___| /\___ >__| \____|__ / __/| __/
\/ \/ \/ \/ \/ \/|__| |__|
`
fmt.Println(colorReset, strings.TrimSpace(splashText))
}

func checkError(err error) {
if err != nil {
panic(err)
}
}
package main

import (
"Ticketing/internal/builder"
"Ticketing/internal/config"
"Ticketing/internal/http/binder"
"Ticketing/internal/http/server"
"Ticketing/internal/http/validator"
"context"
"fmt"
"log"
"os"
"os/signal"
"strings"
"time"

"github.com/labstack/echo/v4"
"github.com/midtrans/midtrans-go"
"github.com/midtrans/midtrans-go/snap"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"gorm.io/gorm/logger"
)

func main() {
//menghubungkan ke postgresql atau database
cfg, err := config.NewConfig(".env")
checkError(err)

splash()

db, err := buildGormDB(cfg.Postgres)
checkError(err)

midtransClient := initMidtrans(cfg)

publicRoutes := builder.BuildPublicRoutes(cfg, db, midtransClient)
privateRoutes := builder.BuildPrivateRoutes(cfg, db, midtransClient)

echoBinder := &echo.DefaultBinder{}
formValidator := validator.NewFormValidator()
customBinder := binder.NewBinder(echoBinder, formValidator)

srv := server.NewServer(
cfg,
customBinder,
publicRoutes,
privateRoutes,
)

runServer(srv, cfg.Port)

waitForShutdown(srv)
}

func initMidtrans(cfg *config.Config) snap.Client {
snapClient := snap.Client{}

if cfg.Env == "development" {
snapClient.New(cfg.MidtransConfig.ServerKey, midtrans.Sandbox)
} else {
snapClient.New(cfg.MidtransConfig.ServerKey, midtrans.Production)
}

return snapClient
}

func runServer(srv *server.Server, port string) {
go func() {
err := srv.Start(fmt.Sprintf(":%s", port))
log.Fatal(err)
}()
}

// berfungsi ketika API mati akan hidup sendiri lagi. ini untuk menghindari error ketika API mati
func waitForShutdown(srv *server.Server) {
quit := make(chan os.Signal, 1)
signal.Notify(quit, os.Interrupt)

<-quit

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

go func() {
if err := srv.Shutdown(ctx); err != nil {
srv.Logger.Fatal(err)
}
}()
}

// func untuk koneksi ke postgresql
func buildGormDB(cfg config.PostgresConfig) (*gorm.DB, error) {
dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=disable TimeZone=Asia/Jakarta", cfg.Host, cfg.User, cfg.Password, cfg.Database, cfg.Port)
return gorm.Open(postgres.Open(dsn), &gorm.Config{
Logger: logger.Default.LogMode(logger.Info),
})
}

// untuk membuat spalsh screen ini bisa menggunakan website
// ascii text style generator seperti patorjk.com
func splash() {
colorReset := "\033[0m"

splashText := `

___________.__ __ __ .__
\__ ___/|__| ____ | | __ ____ _/ |_ |__| ____ ____
| | | |_/ ___\ | |/ /_/ __ \ \ __\| | / \ / ___\
| | | |\ \___ | < \ ___/ | | | || | \ / /_/ >
|____| |__| \___ >|__|_ \ \___ > |__| |__||___| / \___ /
\/ \/ \/ \/ /_____/
`
fmt.Println(colorReset, strings.TrimSpace(splashText))
}

// func untuk cek error
func checkError(err error) {
if err != nil {
panic(err)
}
}
29 changes: 17 additions & 12 deletions common/jwt.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
package common

import (
"github.com/golang-jwt/jwt/v5"
)

type JwtCustomClaims struct {
ID int64 `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
jwt.RegisteredClaims
}
package common

//note : file ini untuk buat claims JWT
// claims JWT adalah data yang akan dienkripsi dan ditandatangani oleh JWT
// claims JWT ini nantinya akan disimpan di dalam payload JWT

import (
"github.com/golang-jwt/jwt/v5"
)

type JwtCustomClaims struct {
ID int64 `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Role string `json:"role"`
jwt.RegisteredClaims // ini untuk exp at
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BEGIN;

DROP TABLE IF EXISTS "public"."topup";

COMMIT;
11 changes: 11 additions & 0 deletions db/migration-golang/20231127065301_create_topup_tabel.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
BEGIN;
CREATE TABLE IF NOT EXISTS "public"."topup" (
"id" varchar(255) NOT NULL PRIMARY KEY,
"user_id" INT,
"amount" INT,
"status" INT,
"snap_url" varchar(255),
"created_at" TIMESTAMP,
"updated_at" TIMESTAMP
);
COMMIT;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BEGIN;

DROP TABLE IF EXISTS "public"."users";

BEGIN;
DROP TABLE IF EXISTS "public"."users";
COMMIT;
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
BEGIN;
CREATE TABLE IF NOT EXISTS "public"."users" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"created_at" timestamptz (6) NOT NULL,
"updated_at" timestamptz (6) NOT NULL,
"deleted_at" timestamptz (6)
);
BEGIN;
CREATE TABLE IF NOT EXISTS "public"."users" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
email VARCHAR(255) NOT NULL,
number VARCHAR(255) NOT NULL,
roles VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
saldo INTEGER NOT NULL,
"created_at" timestamptz (6) NOT NULL,
"updated_at" timestamptz (6) NOT NULL,
"deleted_at" timestamptz (6)
);
COMMIT;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BEGIN;

DROP TABLE IF EXISTS "public"."notification";

COMMIT;
Loading