ibrahimadlani / twitch-recap

Web application made to get the bests of your twitch videos. (chats, audience activity, custom videos)
1 stars 0 forks source link

Create Model for Twitch Videos #8

Open ibrahimadlani opened 3 months ago

ibrahimadlani commented 3 months ago

Description

This task involves creating a model to store static information about Twitch videos. The model will include fields for the title, Twitch video ID, author ID, duration, and other relevant details. This will allow the application to store and manage information about Twitch videos effectively.

Steps

  1. Define Twitch Video Model:

    • Create a new model in the "core" app named TwitchVideo.
    • Define fields for storing the following information:
      • title (CharField): The title of the Twitch video.
      • twitch_video_id (CharField): The unique ID of the video on Twitch.
      • author_id (CharField): The ID of the author or streamer.
      • duration (DurationField): The duration of the video.
      • description (TextField): A brief description of the video.
      • created_at (DateTimeField): The date and time when the video was created.
      • thumbnail_url (URLField): The URL of the video's thumbnail.
      • view_count (IntegerField): The number of views the video has received.
      • language (CharField): The language of the video.
      • Any other relevant fields.
  2. Update Admin:

    • Register the TwitchVideo model with the Django admin site for easy management.
  3. Create and Apply Migrations:

    • Create migrations for the new model.
    • Apply the migrations to update the database schema.
  4. Testing:

    • Write tests to ensure the TwitchVideo model works as expected.
    • Test creating, reading, updating, and deleting TwitchVideo instances.
  5. Documentation:

    • Update the project documentation to include information about the new TwitchVideo model.
    • Provide examples of how to use the model in views and serializers.

Resources

Priority