Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Show Model #22

Open
5 tasks
Lapotor opened this issue Nov 1, 2023 · 0 comments · May be fixed by #103
Open
5 tasks

Create Show Model #22

Lapotor opened this issue Nov 1, 2023 · 0 comments · May be fixed by #103
Assignees
Milestone

Comments

@Lapotor
Copy link
Collaborator

Lapotor commented Nov 1, 2023

Description:

This work item involves creating the Show model for the Laravel project. The Show model will represent the structure and attributes of a broadcast show, including details such as title, start date, end date, live status, and moderators.

Model Decleration
Show:
  type: object
  required:
    - id
    - created_at
    - updated_at
    - title
    - start_date
    - end_date
    - is_live
    - enabled
    - moderators
  properties:
    id:
      type: integer
    created_at:
      type: string
      format: date-time
    updated_at:
      type: string
      format: date-time
    title:
      type: string
    body:
      type: object
    start_date:
      type: string
      format: date-time
    end_date:
      type: string
      format: date-time
    is_live:
      type: boolean
    enabled:
      type: boolean
    moderators:
      type: array
      minItems: 1
      items:
        type: object
        properties:
          id:
            type: integer
          name:
            type: string
          primary:
            type: boolean
    locked_by:
      type: integer

Tasks:

  • Generate the Show model using Laravel's Artisan command or manually create the model file.
  • Define the necessary attributes in the Show model, including id, created_at, updated_at, title, body, start_date, end_date, is_live, enabled, moderators, and locked_by.
  • Set up any relationships or associations with other models if required (e.g., relationship with Moderator model).
  • Add validation rules for the attributes to ensure data integrity.
  • Implement any additional methods or functionality specific to the Show model.

Acceptance Criteria:

  • The Show model file is created and located in the appropriate directory within the Laravel project.
  • The model contains the specified attributes with appropriate data types and any required relationships.
  • Validation rules are defined to ensure valid data entry.
  • The model passes any relevant unit tests associated with it.

Additional Notes:

  • Ensure that the model follows Laravel's naming conventions and adheres to the project's coding standards.
  • If any changes are made to the database schema, don't forget to generate and run the corresponding migrations.
@Lapotor Lapotor added this to the v1.0.0 milestone Nov 1, 2023
@Lapotor Lapotor linked a pull request Dec 29, 2023 that will close this issue
@Lapotor Lapotor self-assigned this Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant