adding new filds to account

This commit is contained in:
José Salazar
2026-01-26 13:49:57 -05:00
parent 2f5c607996
commit 42a11590f1
3 changed files with 18 additions and 6 deletions

View File

@@ -4,6 +4,8 @@ mutation createAccount(
$last4: String! $last4: String!
$isPrimary: Boolean $isPrimary: Boolean
$ownerId: UUID! $ownerId: UUID!
$accountNumber: String
$routeNumber: String
) @auth(level: USER) { ) @auth(level: USER) {
account_insert( account_insert(
data: { data: {
@@ -12,6 +14,8 @@ mutation createAccount(
last4: $last4 last4: $last4
isPrimary: $isPrimary isPrimary: $isPrimary
ownerId: $ownerId ownerId: $ownerId
accountNumber: $accountNumber
routeNumber: $routeNumber
} }
) )
} }
@@ -22,6 +26,8 @@ mutation updateAccount(
$type: AccountType $type: AccountType
$last4: String $last4: String
$isPrimary: Boolean $isPrimary: Boolean
$accountNumber: String
$routeNumber: String
) @auth(level: USER) { ) @auth(level: USER) {
account_update( account_update(
id: $id id: $id
@@ -30,6 +36,8 @@ mutation updateAccount(
type: $type type: $type
last4: $last4 last4: $last4
isPrimary: $isPrimary isPrimary: $isPrimary
accountNumber: $accountNumber
routeNumber: $routeNumber
} }
) )
} }

View File

@@ -6,9 +6,9 @@ query listAccounts @auth(level: USER) {
last4 last4
isPrimary isPrimary
ownerId ownerId
accountNumber
routeNumber
createdAt createdAt
updatedAt
createdBy
} }
} }
@@ -20,9 +20,9 @@ query getAccountById($id: UUID!) @auth(level: USER) {
last4 last4
isPrimary isPrimary
ownerId ownerId
accountNumber
routeNumber
createdAt createdAt
updatedAt
createdBy
} }
} }
@@ -34,9 +34,9 @@ query getAccountsByOwnerId($ownerId: UUID!) @auth(level: USER) {
last4 last4
isPrimary isPrimary
ownerId ownerId
accountNumber
routeNumber
createdAt createdAt
updatedAt
createdBy
} }
} }
@@ -60,5 +60,7 @@ query filterAccounts(
last4 last4
isPrimary isPrimary
ownerId ownerId
accountNumber
routeNumber
} }
} }

View File

@@ -10,6 +10,8 @@ type Account @table(name: "accounts") {
type: AccountType! type: AccountType!
last4: String! last4: String!
isPrimary: Boolean isPrimary: Boolean
accountNumber: String
routeNumber: String
ownerId: UUID! #staff/business ownerId: UUID! #staff/business
createdAt: Timestamp @default(expr: "request.time") createdAt: Timestamp @default(expr: "request.time")
updatedAt: Timestamp @default(expr: "request.time") updatedAt: Timestamp @default(expr: "request.time")