|
@ -1,5 +1,8 @@ |
|
|
package metas |
|
|
package metas |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
|
"time" |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
class Album(DeclarativeDeneb): |
|
|
class Album(DeclarativeDeneb): |
|
@ -29,8 +32,29 @@ class Album(DeclarativeDeneb): |
|
|
updated = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
updated = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
# } |
|
|
# } |
|
|
provider = relation('Provider', uselist=False) |
|
|
provider = relation('Provider', uselist=False) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
type Album struct { |
|
|
|
|
|
Id string `json:"id"` |
|
|
|
|
|
AlbumName string `json:"albumName"` |
|
|
|
|
|
Index int `json:"index"` |
|
|
|
|
|
IsSeries bool `json:"isSeries"` |
|
|
|
|
|
FilmTotal int `json:"filmTotal"` |
|
|
|
|
|
FilmCount int `json:"filmCount"` |
|
|
|
|
|
Remark string `json:"remark"` |
|
|
|
|
|
IssueDate *time.Time `json:"issueDate"` |
|
|
|
|
|
PublishTime *time.Time `json:"publishTime"` |
|
|
|
|
|
Score float32 `json:"score"` |
|
|
|
|
|
ContentRating string `json:"contentRating"` |
|
|
|
|
|
AlbumPicture string `json:"albumPicture"` |
|
|
|
|
|
ProviderId string `json:"providerId"` |
|
|
|
|
|
ImdbId string `json:"imdbId"` |
|
|
|
|
|
CpRefId string `json:"cpRefId"` |
|
|
|
|
|
Description string `json:"description"` |
|
|
|
|
|
Status int16 `json:"status"` |
|
|
|
|
|
Created *time.Time `json:"created"` |
|
|
|
|
|
Updated *time.Time `json:"Updated"` |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
class Film(DeclarativeDeneb): |
|
|
class Film(DeclarativeDeneb): |
|
|
__tablename__ = 'metas_films' |
|
|
__tablename__ = 'metas_films' |
|
|
# { |
|
|
# { |
|
@ -48,8 +72,23 @@ class Film(DeclarativeDeneb): |
|
|
created = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
created = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
updated = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
updated = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
# } |
|
|
# } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
type Film struct { |
|
|
|
|
|
Id string `json:"id"` |
|
|
|
|
|
FilmName string `json:"filmName"` |
|
|
|
|
|
Remark string `json:"remark"` |
|
|
|
|
|
FilmPicture string `json:"filmPicture"` |
|
|
|
|
|
Language string `json:"language"` |
|
|
|
|
|
Duration int `json:"duration"` |
|
|
|
|
|
IssueDate *time.Time `json:"issueDate"` |
|
|
|
|
|
PublishTime *time.Time `json:"publishTime"` |
|
|
|
|
|
CpRefId string `json:"cpRefId"` |
|
|
|
|
|
Description string `json:"description"` |
|
|
|
|
|
Status int16 `json:"status"` |
|
|
|
|
|
Created *time.Time `json:"created"` |
|
|
|
|
|
Updated *time.Time `json:"Updated"` |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
class AlbumFilm(DeclarativeDeneb): |
|
|
class AlbumFilm(DeclarativeDeneb): |
|
|
__tablename__ = 'metas_album_films' |
|
|
__tablename__ = 'metas_album_films' |
|
|
# { |
|
|
# { |
|
@ -66,8 +105,15 @@ class AlbumFilm(DeclarativeDeneb): |
|
|
# } |
|
|
# } |
|
|
album = relation('Album', uselist=False, backref=backref("films")) |
|
|
album = relation('Album', uselist=False, backref=backref("films")) |
|
|
film = relation('Film', uselist=False) |
|
|
film = relation('Film', uselist=False) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
type AlbumFilm struct { |
|
|
|
|
|
AlbumId string `json:"albumId"` |
|
|
|
|
|
FilmId string `json:"filmId"` |
|
|
|
|
|
Index int `json:"index"` |
|
|
|
|
|
Created *time.Time `json:"created"` |
|
|
|
|
|
Updated *time.Time `json:"Updated"` |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
class AlbumTag(DeclarativeDeneb): |
|
|
class AlbumTag(DeclarativeDeneb): |
|
|
__tablename__ = "metas_album_tags" |
|
|
__tablename__ = "metas_album_tags" |
|
|
# { |
|
|
# { |
|
@ -78,8 +124,13 @@ class AlbumTag(DeclarativeDeneb): |
|
|
tag = Column(Unicode(32), nullable=False, default=u"") |
|
|
tag = Column(Unicode(32), nullable=False, default=u"") |
|
|
# } |
|
|
# } |
|
|
album = relation('Album', uselist=False, backref=backref("tags")) |
|
|
album = relation('Album', uselist=False, backref=backref("tags")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
type AlbumTag struct { |
|
|
|
|
|
Id string `json:"id"` |
|
|
|
|
|
AlbumId string `json:"albumId"` |
|
|
|
|
|
Tag string `json:"tag"` |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
class AlbumGenius(DeclarativeDeneb): |
|
|
class AlbumGenius(DeclarativeDeneb): |
|
|
__tablename__ = "metas_album_geniuses" |
|
|
__tablename__ = "metas_album_geniuses" |
|
|
# { |
|
|
# { |
|
@ -90,8 +141,13 @@ class AlbumGenius(DeclarativeDeneb): |
|
|
genius = Column(Unicode(32), nullable=False, default=u"") |
|
|
genius = Column(Unicode(32), nullable=False, default=u"") |
|
|
# } |
|
|
# } |
|
|
album = relation('Album', uselist=False, backref=backref("geniuses")) |
|
|
album = relation('Album', uselist=False, backref=backref("geniuses")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
type AlbumGenius struct { |
|
|
|
|
|
Id string `json:"id"` |
|
|
|
|
|
AlbumId string `json:"albumId"` |
|
|
|
|
|
Genius string `json:"genius"` |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
class Crew(DeclarativeDeneb): |
|
|
class Crew(DeclarativeDeneb): |
|
|
__tablename__ = "metas_crews" |
|
|
__tablename__ = "metas_crews" |
|
|
# { |
|
|
# { |
|
@ -106,8 +162,20 @@ class Crew(DeclarativeDeneb): |
|
|
created = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
created = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
updated = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
updated = Column(DateTime, nullable=False, default=func.NOW()) |
|
|
# } |
|
|
# } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
type Crew struct { |
|
|
|
|
|
Id string `json:"id"` |
|
|
|
|
|
FullName string `json:"fullName"` |
|
|
|
|
|
FirstName string `json:"firstName"` |
|
|
|
|
|
MiddleName string `json:"middleName"` |
|
|
|
|
|
LastName string `json:"lastName"` |
|
|
|
|
|
Region string `json:"region"` |
|
|
|
|
|
ImdbId string `json:"imdbId"` |
|
|
|
|
|
Description string `json:"description"` |
|
|
|
|
|
Created *time.Time `json:"created"` |
|
|
|
|
|
Updated *time.Time `json:"Updated"` |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
class AlbumCrew(DeclarativeDeneb): |
|
|
class AlbumCrew(DeclarativeDeneb): |
|
|
__tablename__ = "metas_album_crews" |
|
|
__tablename__ = "metas_album_crews" |
|
|
# { |
|
|
# { |
|
@ -122,8 +190,14 @@ class AlbumCrew(DeclarativeDeneb): |
|
|
# } |
|
|
# } |
|
|
crew = relation('Crew', uselist=False) |
|
|
crew = relation('Crew', uselist=False) |
|
|
album = relation('Album', uselist=False, backref=backref("crews")) |
|
|
album = relation('Album', uselist=False, backref=backref("crews")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
type AlbumCrew struct { |
|
|
|
|
|
Id string `json:"id"` |
|
|
|
|
|
AlbumId string `json:"albumId"` |
|
|
|
|
|
CrewId string `json:"crewId"` |
|
|
|
|
|
Role string `json:"role"` |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
class FilmCrew(DeclarativeDeneb): |
|
|
class FilmCrew(DeclarativeDeneb): |
|
|
__tablename__ = "metas_film_crews" |
|
|
__tablename__ = "metas_film_crews" |
|
|
# { |
|
|
# { |
|
@ -138,8 +212,14 @@ class FilmCrew(DeclarativeDeneb): |
|
|
# } |
|
|
# } |
|
|
crew = relation('Crew', uselist=False) |
|
|
crew = relation('Crew', uselist=False) |
|
|
film = relation('Film', uselist=False, backref=backref("crews")) |
|
|
film = relation('Film', uselist=False, backref=backref("crews")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
type FilmCrew struct { |
|
|
|
|
|
Id string `json:"id"` |
|
|
|
|
|
FilmId string `json:"filmId"` |
|
|
|
|
|
CrewId string `json:"crewId"` |
|
|
|
|
|
Role string `json:"role"` |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
class ScreenShot(DeclarativeDeneb): |
|
|
class ScreenShot(DeclarativeDeneb): |
|
|
__tablename__ = "metas_film_screenshots" |
|
|
__tablename__ = "metas_film_screenshots" |
|
|
# { |
|
|
# { |
|
@ -153,3 +233,10 @@ class ScreenShot(DeclarativeDeneb): |
|
|
# } |
|
|
# } |
|
|
film = relation('Film', uselist=False, backref=backref("screenShots")) |
|
|
film = relation('Film', uselist=False, backref=backref("screenShots")) |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
type ScreenShot struct { |
|
|
|
|
|
Id string `json:"id"` |
|
|
|
|
|
FilmId string `json:"filmId"` |
|
|
|
|
|
Uri string `json:"uri"` |
|
|
|
|
|
Created *time.Time `json:"created"` |
|
|
|
|
|
Updated *time.Time `json:"Updated"` |
|
|
|
|
|
} |