Skip to content

Commit

Permalink
PairAlert screen refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrlzy committed Jun 9, 2024
1 parent 5ae9e83 commit a5ab340
Show file tree
Hide file tree
Showing 12 changed files with 483 additions and 168 deletions.
122 changes: 94 additions & 28 deletions app/schemas/dev.arkbuilders.rate.data.db.Database/7.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"formatVersion": 1,
"database": {
"version": 7,
"identityHash": "389590c7e395a4c9f732029d3d7fad49",
"identityHash": "7da9626b330e7b6e11fc4fcdd1da15cf",
"entities": [
{
"tableName": "RoomCurrencyAmount",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `code` TEXT NOT NULL, `amount` REAL NOT NULL)",
"tableName": "RoomAsset",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `code` TEXT NOT NULL, `amount` REAL NOT NULL, `group` TEXT)",
"fields": [
{
"fieldPath": "id",
Expand All @@ -25,6 +25,12 @@
"columnName": "amount",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "group",
"columnName": "group",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
Expand Down Expand Up @@ -95,8 +101,8 @@
"foreignKeys": []
},
{
"tableName": "RoomPairAlertCondition",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `numeratorCode` TEXT NOT NULL, `denominatorCode` TEXT NOT NULL, `ratio` REAL NOT NULL, `moreNotLess` INTEGER NOT NULL)",
"tableName": "RoomPairAlert",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `targetCode` TEXT NOT NULL, `baseCode` TEXT NOT NULL, `targetPrice` REAL NOT NULL, `startPrice` REAL NOT NULL, `alertPercent` REAL, `oneTimeNotRecurrent` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `priceNotPercent` INTEGER NOT NULL, `lastDateTriggered` TEXT, `group` TEXT)",
"fields": [
{
"fieldPath": "id",
Expand All @@ -105,28 +111,64 @@
"notNull": true
},
{
"fieldPath": "numeratorCode",
"columnName": "numeratorCode",
"fieldPath": "targetCode",
"columnName": "targetCode",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "denominatorCode",
"columnName": "denominatorCode",
"fieldPath": "baseCode",
"columnName": "baseCode",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "ratio",
"columnName": "ratio",
"fieldPath": "targetPrice",
"columnName": "targetPrice",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "startPrice",
"columnName": "startPrice",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "moreNotLess",
"columnName": "moreNotLess",
"fieldPath": "alertPercent",
"columnName": "alertPercent",
"affinity": "REAL",
"notNull": false
},
{
"fieldPath": "oneTimeNotRecurrent",
"columnName": "oneTimeNotRecurrent",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "enabled",
"columnName": "enabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "priceNotPercent",
"columnName": "priceNotPercent",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastDateTriggered",
"columnName": "lastDateTriggered",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "group",
"columnName": "group",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
Expand All @@ -139,46 +181,70 @@
"foreignKeys": []
},
{
"tableName": "RoomQuickCurrency",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `usedCount` INTEGER NOT NULL, `usedTime` INTEGER NOT NULL, PRIMARY KEY(`code`))",
"tableName": "RoomQuickPair",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `from` TEXT NOT NULL, `amount` REAL NOT NULL, `to` TEXT NOT NULL, `group` TEXT)",
"fields": [
{
"fieldPath": "code",
"columnName": "code",
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "from",
"columnName": "from",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "usedCount",
"columnName": "usedCount",
"affinity": "INTEGER",
"fieldPath": "amount",
"columnName": "amount",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "usedTime",
"columnName": "usedTime",
"affinity": "INTEGER",
"fieldPath": "to",
"columnName": "to",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "group",
"columnName": "group",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": false,
"autoGenerate": true,
"columnNames": [
"code"
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "RoomQuickConvertToCurrency",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, PRIMARY KEY(`code`))",
"tableName": "RoomCodeUseStat",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `count` INTEGER NOT NULL, `lastUsedDate` TEXT NOT NULL, PRIMARY KEY(`code`))",
"fields": [
{
"fieldPath": "code",
"columnName": "code",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "count",
"columnName": "count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastUsedDate",
"columnName": "lastUsedDate",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
Expand All @@ -194,7 +260,7 @@
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '389590c7e395a4c9f732029d3d7fad49')"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7da9626b330e7b6e11fc4fcdd1da15cf')"
]
}
}
Loading

0 comments on commit a5ab340

Please sign in to comment.