Added copied_from_id on playlists. Fixed timestamp values in models.
This commit is contained in:
parent
20e4733f5a
commit
8090b5b914
@ -1,6 +1,7 @@
|
||||
package com.jdbernard.wdiwtlt.db.models;
|
||||
|
||||
import java.util.Date;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
public class MediaFile extends Model {
|
||||
public static final String TAG_INFO = "tag info";
|
||||
@ -12,7 +13,7 @@ public class MediaFile extends Model {
|
||||
public String filePath;
|
||||
public String fileHash;
|
||||
public String metaInfoSource = TAG_INFO;
|
||||
public Date dateAdded;
|
||||
public Date dateAdded = new Timestamp(new Date().getTime());
|
||||
public String comment;
|
||||
|
||||
public String toString() { return name; }
|
||||
|
@ -1,13 +1,15 @@
|
||||
package com.jdbernard.wdiwtlt.db.models;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
public class Playlist extends Model {
|
||||
public boolean userCreated;
|
||||
public Date lastUsed;
|
||||
public Timestamp lastUsed = new Timestamp(new Date().getTime());
|
||||
public String name;
|
||||
public int modCount;
|
||||
public int mediaFileCount;
|
||||
public Integer copiedFromId;
|
||||
|
||||
public String toString() { return name; }
|
||||
}
|
||||
|
@ -51,7 +51,8 @@ CREATE TABLE playlists (
|
||||
last_used TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
name VARCHAR NOT NULL,
|
||||
mod_count INTEGER NOT NULL DEFAULT 0,
|
||||
media_file_count INTEGER NOT NULL DEFAULT 0
|
||||
media_file_count INTEGER NOT NULL DEFAULT 0,
|
||||
copied_from_id INTEGER REFERENCES playlists(id)
|
||||
);
|
||||
|
||||
CREATE TABLE playlists_media_files (
|
||||
|
Loading…
Reference in New Issue
Block a user