Overview
TheVodStream model represents video-on-demand (VOD) content in the application. It uses Laravel Scout for search functionality and integrates with Spatie Laravel Data.
Model Path: app/Models/VodStream.phpTable:
vod_streamsPrimary Key:
stream_id (non-incrementing)
Database Schema
Primary key for the VOD stream
Unique stream number
Name of the VOD content
Type of the stream
URL to the stream icon/thumbnail
Rating value
Rating on a 5-point scale (precision: 3,1)
Timestamp when the stream was added (immutable)
Whether the content is adult/mature content
Category identifier
File container extension (e.g., ‘mp4’, ‘mkv’)
Custom stream identifier
Direct source URL or reference
Record creation timestamp
Record last update timestamp
Fillable Attributes
The following fields are mass assignable:Type Casts
The model casts the following attributes:stream_id→integerrating_5based→decimal:1is_adult→booleanadded→immutable_datetime
Relationships
Watchlists
Polymorphic one-to-many relationship with the Watchlist model.Search
The VodStream model uses Laravel Scout for full-text search. Only thename field is indexed.
Example:
Data Transfer Object
The model integrates withVodStreamData DTO class:
Adult Content Filtering
Use theis_adult flag to filter mature content: