Update location2025 missing fields

This commit is contained in:
2025-08-31 15:04:35 +09:00
parent 619aa4f396
commit 104d39a96b
3 changed files with 54 additions and 4 deletions

View File

@ -1091,6 +1091,7 @@ class Location2025(models.Model):
cp_number = models.IntegerField(_('CP番号'), db_index=True)
event = models.ForeignKey('NewEvent2', on_delete=models.CASCADE, verbose_name=_('イベント'))
cp_name = models.CharField(_('CP名'), max_length=255)
category = models.CharField(_('カテゴリ'), max_length=255, blank=True, null=True)
sub_loc_id = models.CharField(_('サブロケーションID'), max_length=2048, blank=True, null=True)
subcategory = models.CharField(_('サブカテゴリ'), max_length=2048, blank=True, null=True)
@ -1114,8 +1115,13 @@ class Location2025(models.Model):
# 詳細情報
address = models.CharField(_('住所'), max_length=512, blank=True, null=True)
zip_code = models.CharField(_('郵便番号'), max_length=12, blank=True, null=True)
prefecture = models.CharField(_('都道府県'), max_length=255, blank=True, null=True)
area = models.CharField(_('地域'), max_length=255, blank=True, null=True)
city = models.CharField(_('市区町村'), max_length=255, blank=True, null=True)
phone = models.CharField(_('電話番号'), max_length=32, blank=True, null=True)
website = models.URLField(_('ウェブサイト'), blank=True, null=True)
facility = models.CharField(_('設備'), max_length=255, blank=True, null=True)
description = models.TextField(_('説明'), blank=True, null=True)
# 追加フィールドLocationテーブルから移行
@ -1265,8 +1271,9 @@ class Location2025(models.Model):
'checkin_radius': checkin_radius, # チェックイン範囲を追加
# 新しいフィールド
'category': row.get('category', ''),
'sub_loc_id': row.get('sub_loc_id', ''),
'subcategory': row.get('subcategory', row.get('category', '')),
'subcategory': row.get('subcategory', ''),
'photos': row.get('photos', ''),
'videos': row.get('videos', ''),
'tags': row.get('tags', ''),