Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
Your Cashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ahmad Abi Mulya
Your Cashier
Commits
f193e02d
Commit
f193e02d
authored
Sep 02, 2020
by
Wahyu Wibowo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.mdd.co.id:44195/abimulya/your-cashier
parents
08138e80
d96c6761
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
ABI.xml
.idea/dictionaries/ABI.xml
+7
-0
LocalDatabase.java
.../com/example/yourcashiertest/databases/LocalDatabase.java
+7
-7
Transaksi.java
.../java/com/example/yourcashiertest/entities/Transaksi.java
+6
-0
No files found.
.idea/dictionaries/ABI.xml
0 → 100644
View file @
f193e02d
<component
name=
"ProjectDictionaryState"
>
<dictionary
name=
"ABI"
>
<words>
<w>
transaksi
</w>
</words>
</dictionary>
</component>
\ No newline at end of file
app/src/main/java/com/example/yourcashiertest/databases/LocalDatabase.java
View file @
f193e02d
...
...
@@ -43,13 +43,6 @@ public abstract class LocalDatabase extends RoomDatabase {
}
};
public
static
final
Migration
MIGRATION_4_5
=
new
Migration
(
4
,
5
)
{
@Override
public
void
migrate
(
@NonNull
SupportSQLiteDatabase
database
)
{
database
.
execSQL
(
"CREATE TABLE IF NOT EXISTS Transaksi (orderId INTEGER NOT NULL, "
+
"amount INTEGER NOT NULL, status TEXT NOT NULL, PRIMARY KEY(orderId))"
);
}
};
public
static
final
Migration
MIGRATION_2_3
=
new
Migration
(
2
,
3
)
{
@Override
...
...
@@ -65,6 +58,13 @@ public abstract class LocalDatabase extends RoomDatabase {
}
};
public
static
final
Migration
MIGRATION_4_5
=
new
Migration
(
4
,
5
)
{
@Override
public
void
migrate
(
@NonNull
SupportSQLiteDatabase
database
)
{
database
.
execSQL
(
"CREATE TABLE IF NOT EXISTS Transaksi (orderId INTEGER NOT NULL, "
+
"amount INTEGER NOT NULL, status TEXT NOT NULL, PRIMARY KEY(orderId))"
);
}
};
public
static
LocalDatabase
getDatabase
(
Context
context
)
{
if
(
INSTANCE
==
null
)
{
synchronized
(
LocalDatabase
.
class
)
{
...
...
app/src/main/java/com/example/yourcashiertest/entities/Transaksi.java
View file @
f193e02d
...
...
@@ -29,6 +29,12 @@ public class Transaksi implements Parcelable {
status
=
in
.
readString
();
}
public
Transaksi
(
long
orderId
,
long
amount
,
String
status
){
this
.
orderId
=
orderId
;
this
.
amount
=
amount
;
this
.
status
=
status
;
}
public
static
final
Creator
<
Transaksi
>
CREATOR
=
new
Creator
<
Transaksi
>()
{
@Override
public
Transaksi
createFromParcel
(
Parcel
in
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment