Added create_at fields on playlists and bookmarks.
This commit is contained in:
parent
47590a8c8f
commit
8edf542726
@ -1,11 +1,14 @@
|
||||
package com.jdbernard.wdiwtlt.db.models;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Bookmark extends Model {
|
||||
public String name;
|
||||
public int playlistId;
|
||||
public int mediaFileId;
|
||||
public int playIndex;
|
||||
public boolean user_created;
|
||||
public Date createdAt = new Date();
|
||||
|
||||
public String toString() { return name; }
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ public class Playlist extends Model {
|
||||
public int modCount = 0;
|
||||
public int mediaFileCount = 0;
|
||||
public Integer copiedFromId = null;
|
||||
public Date createdAt = new Date()t;
|
||||
|
||||
public String toString() {
|
||||
if (userCreated) return name;
|
||||
|
@ -53,7 +53,8 @@ CREATE TABLE playlists (
|
||||
name VARCHAR NOT NULL,
|
||||
mod_count INTEGER NOT NULL DEFAULT 0,
|
||||
media_file_count INTEGER NOT NULL DEFAULT 0,
|
||||
copied_from_id INTEGER REFERENCES playlists(id) DEFAULT NULL
|
||||
copied_from_id INTEGER REFERENCES playlists(id) DEFAULT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE TABLE playlists_media_files (
|
||||
@ -69,7 +70,8 @@ CREATE TABLE bookmarks (
|
||||
user_created BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
playlist_id INTEGER NOT NULL REFERENCES playlists(id) ON DELETE CASCADE,
|
||||
media_file_id INTEGER NOT NULL REFERENCES media_files(id) ON DELETE CASCADE,
|
||||
play_index INTEGER NOT NULL
|
||||
play_index INTEGER NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE TABLE media_files_tags (
|
||||
|
Loading…
Reference in New Issue
Block a user