Add collectionID as an attribute to files
This commit is contained in:
parent
b12f746567
commit
da8b69084b
3 changed files with 7 additions and 0 deletions
|
@ -19,6 +19,7 @@ class FilesDB {
|
|||
static final columnGeneratedID = '_id';
|
||||
static final columnUploadedFileID = 'uploaded_file_id';
|
||||
static final columnOwnerID = 'owner_id';
|
||||
static final columnCollectionID = 'collection_id';
|
||||
static final columnLocalID = 'local_id';
|
||||
static final columnTitle = 'title';
|
||||
static final columnDeviceFolder = 'device_folder';
|
||||
|
@ -66,6 +67,7 @@ class FilesDB {
|
|||
$columnLocalID TEXT,
|
||||
$columnUploadedFileID INTEGER,
|
||||
$columnOwnerID INTEGER,
|
||||
$columnCollectionID INTEGER,
|
||||
$columnTitle TEXT NOT NULL,
|
||||
$columnDeviceFolder TEXT NOT NULL,
|
||||
$columnLatitude REAL,
|
||||
|
@ -375,6 +377,7 @@ class FilesDB {
|
|||
row[columnLocalID] = file.localID;
|
||||
row[columnUploadedFileID] = file.uploadedFileID;
|
||||
row[columnOwnerID] = file.ownerID;
|
||||
row[columnCollectionID] = file.collectionID;
|
||||
row[columnTitle] = file.title;
|
||||
row[columnDeviceFolder] = file.deviceFolder;
|
||||
if (file.location != null) {
|
||||
|
@ -410,6 +413,7 @@ class FilesDB {
|
|||
file.localID = row[columnLocalID];
|
||||
file.uploadedFileID = row[columnUploadedFileID];
|
||||
file.ownerID = row[columnUploadedFileID];
|
||||
file.collectionID = row[columnCollectionID];
|
||||
file.title = row[columnTitle];
|
||||
file.deviceFolder = row[columnDeviceFolder];
|
||||
if (row[columnLatitude] != null && row[columnLongitude] != null) {
|
||||
|
|
|
@ -8,6 +8,7 @@ class File {
|
|||
int generatedID;
|
||||
int uploadedFileID;
|
||||
int ownerID;
|
||||
int collectionID;
|
||||
String localID;
|
||||
String title;
|
||||
String deviceFolder;
|
||||
|
@ -29,6 +30,7 @@ class File {
|
|||
File.fromJson(Map<String, dynamic> json) {
|
||||
uploadedFileID = json["id"];
|
||||
ownerID = json["ownerID"];
|
||||
collectionID = json["collectionID"];
|
||||
localID = json["deviceFileID"];
|
||||
deviceFolder = json["deviceFolder"];
|
||||
title = json["title"];
|
||||
|
|
|
@ -34,6 +34,7 @@ class DiffFetcher {
|
|||
final file = File();
|
||||
file.uploadedFileID = item["id"];
|
||||
file.ownerID = item["ownerID"];
|
||||
file.collectionID = item["collectionID"];
|
||||
file.updationTime = item["updationTime"];
|
||||
file.isEncrypted = true;
|
||||
file.encryptedKey = item["encryptedKey"];
|
||||
|
|
Loading…
Add table
Reference in a new issue