feat(api): rename podcasts models fields (#1910)
This commit is contained in:
parent
9c042c881a
commit
04fbcc5f36
|
@ -9,12 +9,14 @@ class Podcast(models.Model):
|
|||
language = models.CharField(max_length=4096, blank=True, null=True)
|
||||
copyright = models.CharField(max_length=4096, blank=True, null=True)
|
||||
link = models.CharField(max_length=4096, blank=True, null=True)
|
||||
|
||||
itunes_author = models.CharField(max_length=4096, blank=True, null=True)
|
||||
itunes_keywords = models.CharField(max_length=4096, blank=True, null=True)
|
||||
itunes_summary = models.CharField(max_length=4096, blank=True, null=True)
|
||||
itunes_subtitle = models.CharField(max_length=4096, blank=True, null=True)
|
||||
itunes_category = models.CharField(max_length=4096, blank=True, null=True)
|
||||
itunes_explicit = models.CharField(max_length=4096, blank=True, null=True)
|
||||
|
||||
owner = models.ForeignKey(
|
||||
"core.User",
|
||||
on_delete=models.DO_NOTHING,
|
||||
|
@ -35,14 +37,16 @@ class Podcast(models.Model):
|
|||
|
||||
|
||||
class PodcastEpisode(models.Model):
|
||||
podcast = models.ForeignKey("Podcast", on_delete=models.DO_NOTHING)
|
||||
|
||||
file = models.ForeignKey(
|
||||
"storage.File",
|
||||
on_delete=models.DO_NOTHING,
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
podcast = models.ForeignKey("Podcast", on_delete=models.DO_NOTHING)
|
||||
publication_date = models.DateTimeField()
|
||||
|
||||
published_at = models.DateTimeField(db_column="publication_date")
|
||||
download_url = models.CharField(max_length=4096)
|
||||
episode_guid = models.CharField(max_length=4096)
|
||||
episode_title = models.CharField(max_length=4096)
|
||||
|
@ -78,10 +82,15 @@ class StationPodcast(models.Model):
|
|||
|
||||
|
||||
class ImportedPodcast(models.Model):
|
||||
auto_ingest = models.BooleanField()
|
||||
auto_ingest_timestamp = models.DateTimeField(blank=True, null=True)
|
||||
album_override = models.BooleanField()
|
||||
podcast = models.ForeignKey("Podcast", on_delete=models.DO_NOTHING)
|
||||
override_album = models.BooleanField(db_column="album_override")
|
||||
|
||||
auto_ingest = models.BooleanField()
|
||||
auto_ingested_at = models.DateTimeField(
|
||||
blank=True,
|
||||
null=True,
|
||||
db_column="auto_ingest_timestamp",
|
||||
)
|
||||
|
||||
def get_owner(self):
|
||||
return self.podcast.owner
|
||||
|
|
|
@ -6110,21 +6110,21 @@ components:
|
|||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
override_album:
|
||||
type: boolean
|
||||
auto_ingest:
|
||||
type: boolean
|
||||
auto_ingest_timestamp:
|
||||
auto_ingested_at:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
album_override:
|
||||
type: boolean
|
||||
podcast:
|
||||
type: string
|
||||
format: uri
|
||||
required:
|
||||
- album_override
|
||||
- auto_ingest
|
||||
- item_url
|
||||
- override_album
|
||||
- podcast
|
||||
ListenerCount:
|
||||
type: object
|
||||
|
@ -6523,14 +6523,14 @@ components:
|
|||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
override_album:
|
||||
type: boolean
|
||||
auto_ingest:
|
||||
type: boolean
|
||||
auto_ingest_timestamp:
|
||||
auto_ingested_at:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
album_override:
|
||||
type: boolean
|
||||
podcast:
|
||||
type: string
|
||||
format: uri
|
||||
|
@ -6816,7 +6816,7 @@ components:
|
|||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
publication_date:
|
||||
published_at:
|
||||
type: string
|
||||
format: date-time
|
||||
download_url:
|
||||
|
@ -6830,13 +6830,13 @@ components:
|
|||
maxLength: 4096
|
||||
episode_description:
|
||||
type: string
|
||||
podcast:
|
||||
type: string
|
||||
format: uri
|
||||
file:
|
||||
type: string
|
||||
format: uri
|
||||
nullable: true
|
||||
podcast:
|
||||
type: string
|
||||
format: uri
|
||||
PatchedPreference:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -7675,7 +7675,7 @@ components:
|
|||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
publication_date:
|
||||
published_at:
|
||||
type: string
|
||||
format: date-time
|
||||
download_url:
|
||||
|
@ -7689,13 +7689,13 @@ components:
|
|||
maxLength: 4096
|
||||
episode_description:
|
||||
type: string
|
||||
podcast:
|
||||
type: string
|
||||
format: uri
|
||||
file:
|
||||
type: string
|
||||
format: uri
|
||||
nullable: true
|
||||
podcast:
|
||||
type: string
|
||||
format: uri
|
||||
required:
|
||||
- download_url
|
||||
- episode_description
|
||||
|
@ -7703,7 +7703,7 @@ components:
|
|||
- episode_title
|
||||
- item_url
|
||||
- podcast
|
||||
- publication_date
|
||||
- published_at
|
||||
Preference:
|
||||
type: object
|
||||
properties:
|
||||
|
|
Loading…
Reference in New Issue