2022-12-07 19:09:05 -05:00
|
|
|
from catalog.common import *
|
2022-12-16 01:08:10 -05:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from django.db import models
|
2022-12-07 19:09:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
class Game(Item):
|
2022-12-11 23:20:28 +00:00
|
|
|
category = ItemCategory.Game
|
2022-12-29 23:57:02 -05:00
|
|
|
url_path = "game"
|
|
|
|
demonstrative = _("这个游戏")
|
2022-12-08 23:58:44 +00:00
|
|
|
igdb = PrimaryLookupIdDescriptor(IdType.IGDB)
|
|
|
|
steam = PrimaryLookupIdDescriptor(IdType.Steam)
|
|
|
|
douban_game = PrimaryLookupIdDescriptor(IdType.DoubanGame)
|
2022-12-16 01:08:10 -05:00
|
|
|
|
|
|
|
METADATA_COPY_LIST = [
|
2022-12-29 23:57:02 -05:00
|
|
|
"title",
|
|
|
|
"brief",
|
|
|
|
"other_title",
|
|
|
|
"developer",
|
|
|
|
"publisher",
|
|
|
|
"release_date",
|
|
|
|
"genre",
|
|
|
|
"platform",
|
|
|
|
"official_site",
|
2022-12-16 01:08:10 -05:00
|
|
|
]
|
|
|
|
|
|
|
|
other_title = jsondata.ArrayField(
|
2022-12-29 23:57:02 -05:00
|
|
|
models.CharField(blank=True, default="", max_length=500),
|
2022-12-16 01:08:10 -05:00
|
|
|
null=True,
|
|
|
|
blank=True,
|
|
|
|
default=list,
|
|
|
|
)
|
|
|
|
|
|
|
|
developer = jsondata.ArrayField(
|
2022-12-29 23:57:02 -05:00
|
|
|
models.CharField(blank=True, default="", max_length=500),
|
2022-12-16 01:08:10 -05:00
|
|
|
null=True,
|
|
|
|
blank=True,
|
|
|
|
default=list,
|
|
|
|
)
|
|
|
|
|
|
|
|
publisher = jsondata.ArrayField(
|
2022-12-29 23:57:02 -05:00
|
|
|
models.CharField(blank=True, default="", max_length=500),
|
2022-12-16 01:08:10 -05:00
|
|
|
null=True,
|
|
|
|
blank=True,
|
|
|
|
default=list,
|
|
|
|
)
|
|
|
|
|
|
|
|
release_date = jsondata.DateField(
|
2022-12-29 23:57:02 -05:00
|
|
|
auto_now=False, auto_now_add=False, null=True, blank=True
|
2022-12-16 01:08:10 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
genre = jsondata.ArrayField(
|
2022-12-29 23:57:02 -05:00
|
|
|
models.CharField(blank=True, default="", max_length=200),
|
2022-12-16 01:08:10 -05:00
|
|
|
null=True,
|
|
|
|
blank=True,
|
|
|
|
default=list,
|
|
|
|
)
|
|
|
|
|
|
|
|
platform = jsondata.ArrayField(
|
2022-12-29 23:57:02 -05:00
|
|
|
models.CharField(blank=True, default="", max_length=200),
|
2022-12-16 01:08:10 -05:00
|
|
|
null=True,
|
|
|
|
blank=True,
|
|
|
|
default=list,
|
|
|
|
)
|
2022-12-17 02:04:12 -05:00
|
|
|
|
|
|
|
official_site = jsondata.CharField(
|
2022-12-29 23:57:02 -05:00
|
|
|
default="",
|
2022-12-17 02:04:12 -05:00
|
|
|
)
|