From 6a042c6a2ffb5c100c49749c71d3e49f0dbba1c7 Mon Sep 17 00:00:00 2001 From: George Ef Date: Fri, 20 Sep 2024 18:54:17 +0200 Subject: [PATCH] show NOT NULL in field comments --- MMEX/Models/Account.swift | 10 +++++----- MMEX/Models/Category.swift | 2 +- MMEX/Models/Currency.swift | 6 +++--- MMEX/Models/Payee.swift | 2 +- MMEX/Models/Transaction.swift | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/MMEX/Models/Account.swift b/MMEX/Models/Account.swift index 1548b51..a8537af 100644 --- a/MMEX/Models/Account.swift +++ b/MMEX/Models/Account.swift @@ -36,10 +36,10 @@ enum AccountType: String, CaseIterable, Identifiable, Codable { struct Account: ExportableEntity { var id: Int64 // ACCOUNTID INTEGER PRIMARY KEY - var name: String // ACCOUNTNAME TEXT COLLATE NOCASE UNIQUE - var type: AccountType // ACCOUNTTYPE TEXT (Cash, Checking, Credit Card, Loan, ...) + var name: String // ACCOUNTNAME TEXT COLLATE NOCASE NOT NULL UNIQUE + var type: AccountType // ACCOUNTTYPE TEXT NOT NULL (Cash, Checking, ...) var num: String? // ACCOUNTNUM TEXT - var status: AccountStatus // STATUS TEXT (Open, Closed) + var status: AccountStatus // STATUS TEXT NOT NULL (Open, Closed) var notes: String? // NOTES TEXT var heldAt: String? // HELDAT TEXT var website: String? // WEBSITE TEXT @@ -47,8 +47,8 @@ struct Account: ExportableEntity { var accessInfo: String? // ACCESSINFO TEXT var initialDate: String? // INITIALDATE TEXT var initialBal: Double? // INITIALBAL NUMERIC - var favoriteAcct: String // FAVORITEACCT TEXT - var currencyId: Int64 // CURRENCYID INTEGER + var favoriteAcct: String // FAVORITEACCT NOT NULL TEXT + var currencyId: Int64 // CURRENCYID NOT NULL INTEGER var statementLocked: Bool? // STATEMENTLOCKED INTEGER var statementDate: String? // STATEMENTDATE TEXT var minimumBalance: Double? // MINIMUMBALANCE NUMERIC diff --git a/MMEX/Models/Category.swift b/MMEX/Models/Category.swift index 93edc4c..b2717cb 100644 --- a/MMEX/Models/Category.swift +++ b/MMEX/Models/Category.swift @@ -10,7 +10,7 @@ import SQLite struct Category: ExportableEntity { var id: Int64 // CATEGID INTEGER PRIMARY KEY - var name: String // CATEGNAME TEXT COLLATE NOCASE + var name: String // CATEGNAME TEXT COLLATE NOCASE NOT NULL var active: Bool? // ACTIVE INTEGER var parentId: Int64? // PARENTID INTEGER // UNIQUE(CATEGNAME, PARENTID) diff --git a/MMEX/Models/Currency.swift b/MMEX/Models/Currency.swift index 67c42fe..70d5f08 100644 --- a/MMEX/Models/Currency.swift +++ b/MMEX/Models/Currency.swift @@ -10,7 +10,7 @@ import SQLite struct Currency: ExportableEntity { var id: Int64 // CURRENCYID INTEGER PRIMARY KEY - var name: String // CURRENCYNAME TEXT COLLATE NOCASE UNIQUE + var name: String // CURRENCYNAME TEXT COLLATE NOCASE NOT NULL UNIQUE var prefixSymbol: String? // PFX_SYMBOL TEXT var suffixSymbol: String? // SFX_SYMBOL TEXT var decimalPoint: String? // DECIMAL_POINT TEXT @@ -19,8 +19,8 @@ struct Currency: ExportableEntity { var centName: String? // CENT_NAME TEXT COLLATE NOCASE var scale: Int? // SCALE INTEGER var baseConversionRate: Double? // BASECONVRATE NUMERIC - var symbol: String // CURRENCY_SYMBOL TEXT COLLATE NOCASE UNIQUE - var type: String // CURRENCY_TYPE TEXT (Fiat, Crypto) + var symbol: String // CURRENCY_SYMBOL TEXT COLLATE NOCASE NOT NULL UNIQUE + var type: String // CURRENCY_TYPE TEXT NOT NULL (Fiat, Crypto) } extension Currency { diff --git a/MMEX/Models/Payee.swift b/MMEX/Models/Payee.swift index 6accc26..53e3e8d 100644 --- a/MMEX/Models/Payee.swift +++ b/MMEX/Models/Payee.swift @@ -10,7 +10,7 @@ import SQLite struct Payee: ExportableEntity { var id: Int64 // PAYEEID INTEGER PRIMARY KEY - var name: String // PAYEENAME TEXT COLLATE NOCASE UNIQUE + var name: String // PAYEENAME TEXT COLLATE NOCASE NOT NULL UNIQUE var categoryId: Int64? // CATEGID INTEGER var number: String? // NUMBER TEXT var website: String? // WEBSITE TEXT diff --git a/MMEX/Models/Transaction.swift b/MMEX/Models/Transaction.swift index cf91bf5..87edc27 100644 --- a/MMEX/Models/Transaction.swift +++ b/MMEX/Models/Transaction.swift @@ -43,12 +43,12 @@ enum TransactionStatus: String, CaseIterable, Identifiable, Codable { struct Transaction: ExportableEntity { var id: Int64 // TRANSID INTEGER PRIMARY KEY - var accountId: Int64 // ACCOUNTID INTEGER + var accountId: Int64 // ACCOUNTID INTEGER NOT NULL var toAccountId: Int64? // TOACCOUNTID INTEGER - var payeeId: Int64 // PAYEEID INTEGER - var transCode: Transcode // TRANSCODE TEXT - var transAmount: Double // TRANSAMOUNT NUMERIC - var status: TransactionStatus // STATUS TEXT (can be NULL) + var payeeId: Int64 // PAYEEID INTEGER NOT NULL + var transCode: Transcode // TRANSCODE TEXT NOT NULL + var transAmount: Double // TRANSAMOUNT NUMERIC NOT NULL + var status: TransactionStatus // STATUS TEXT var transactionNumber: String? // TRANSACTIONNUMBER TEXT var notes: String? // NOTES TEXT var categId: Int64? // CATEGID INTEGER