Final Commit before merge

parent 3ac0262e
......@@ -7,6 +7,10 @@ class Artist(models.Model):
birth_name = models.CharField(max_length=50)
bio = models.TextField()
def __str__(self):
return self.artist_name
class Album(models.Model):
album_name = models.TextField()
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
......@@ -15,10 +19,16 @@ class Album(models.Model):
label = models.TextField()
song_count = models.IntegerField(default=0)
def __str__(self):
return self.album_name
class Song(models.Model):
song_title = models.CharField(max_length=50)
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
album = models.ForeignKey(Album, on_delete=models.CASCADE)
song_length = models.IntegerField(default=0)
music_video = models.BooleanField(default=False)
lyrics = models.TextField()
\ No newline at end of file
lyrics = models.TextField()
def __str__(self):
return self.song_title
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment