U
    2hej                     @   sR   d dl Zd dlmZ d dlZd dlmZmZ d dl	Zd dl
Z
G dd dejZdS )    N)settings)
migrationsmodelsc                ;   @   s  e Zd ZeejdgZejdde	j
ddddfde	j
dd	d
dfde	jddddfde	j
dddddfde	jejddddfde	jddddfde	jddddfd e	jd!dd"dfd#e	jd$d%d&dfd'e	jd(dd)dfd*e	jd+d,ejjd-ejjd.gd/d0fd1e	jd2d3d4d5d6fd7e	jdd8d9dfd:e	jdd;d<dfd=e	jd>d?ejjd@ejjdAgdBd0fdCe	jddDddEdFfdGe	jddHddIdFfdJe	jddKddLdFfdMe	jddNdOdfgdPdQdRdgdSdTejdUde	j
ddddfde	j
dd	d
dfde	jddddfde	j
dddddfde	jejddddfde	jdVdddfde	jddWddfdXe	jdYdZd[gd\d]d^d_fd`e	jdaddbdfd#e	jddcd%d&dFfd'e	jddddd)dFfdee	jddfdgdfdhe	jddidjejjjdkdldmgdndofdpe	jddqdjejjjdrdldmgdsdofdte	jddudvdwdxgdyd]dzd{fd|e	jdd}dd~ddfde	jddddfde	jddddfde	jddddfde	jddddfde	jdddddFfde	jdddddFfde	jdddddFfde	jdddddFfde	jddddfde	jdddejjd-ejjd.gddfdMe	jdddOdfgddddgdSdTejdde	j
ddddfde	j
dd	d
dfde	jejdddddfde	jddddfde	j
dddddfde	jddddfde	jd-dddfgdddddgdSdTejdde	j
ddddfde	j
dd	d
dfde	jejdddddfde	jddddfde	j
dddddfde	jddddfde	jd-dddfgdddddgdSdTejddddgddddejdddejdddejdde	jddddLdFdōejdde	jddddIdFdōejdde	jddddEdFdōejdde	jddddddōejdde	jdddddōejdde	jdddejj j!dddōejdde	j"de#ddd֍dōej$dde	j%dddddddݍdōej$dde	jdddd"dFdōej$dde	jddddddōej$dde	jdejj j&dddōej$dde	jdddddddddddgddd]dddōej$dde	jdddddddddd dddgdddd]dddōej$dde	j'dd	d
dddgdddddōej$dde	jddddgddddddōej(de	j)ddMdgdddej*de	j+e	,d d!d"d#ej*de	j+e	,d$d%d"d#ejd&d'e	j-dd(dej.j	j/j0d)ejd*d+dōejd&d,e	j-dd-dej.j	j/j0d.ejd/d+dōejd&d0e	j-dd1dej.j	j/j0d2ejd3d+dōejd&d4e	j-d5ej.j	j/j1d6d7d8d9dōejd&d:e	j-d;ej.j	j/j1d<dېd=d9dōejd>d'e	j-dd(dej.j	j/j0d)ejd*d+dōejd>d,e	j-dd-dej.j	j/j0d.ejd/d+dōejd>d?e	j-d@ej.j	j/j1d6dAdBd9dōejd>d0e	j-dd1dej.j	j/j0d2ejd3d+dōejd>d:e	j-dCej.j	j/j1dDdېd=d9dōejdEd'e	j-dd(dej.j	j/j0d)ejd*d+dōejdEd,e	j-dd-dej.j	j/j0d.ejd/d+dōejdEd0e	j-dd1dej.j	j/j0d2ejd3d+dōejdFd'e	j-dd(dej.j	j/j0d)ejd*d+dōejdFd,e	j-dd-dej.j	j/j0d.ejd/d+dōejdFd0e	j-dd1dej.j	j/j0d2ejd3d+dōejddGe	j-ddHdej.j	j/j0dIdAdPd+dōejddJe	j-ddKdej.j	j/j0dId7dd+dōej(d&e	j)d:dgdLddej(d&e	j)dgdMddej2d&dNhdOej(d>e	j)d:dgdPddej(d>e	j)dgdQddej2d>dRhdOej(dEe	j)dXdMgdSddej(dEe	j)dgdTddej(dFe	j)d d*gdUddej(dFe	j)dgdVddej(dFe	j)dMgdWddg6Z3dXS (Y  	Migration)channels0001_initialStandaloneFTPConfiguration
created_atTz&Timestamp when this object was createdz
Created At)auto_now_add	help_textverbose_name
updated_atz,Timestamp when this object was last modifiedz
Updated At)auto_nowr   r   
is_deletedFz)Whether this object has been soft-deletedz
Is Deleted)defaultr   r   
deleted_atz+Timestamp when this object was soft-deletedz
Deleted At)blankr   nullr   id)r   editableprimary_key	serializenamez.Human-readable name for this FTP configuration   zConfiguration Name)r   
max_lengthr   descriptionz.Optional description of this FTP configurationDescription)r   r   r   hostz!FTP server hostname or IP addresszFTP HostusernamezUsername for FTP authenticationd   UsernamepasswordzPassword for FTP authenticationPasswordport   z$FTP server port number (default: 21)   i  Port)r   r   
validatorsr   root_directory/z%Root directory path on the FTP serveri  zRoot Directory)r   r   r   r   passive_modez/Whether to use passive mode for FTP connectionszPassive Modessl_enabledz&Whether to use FTPS (FTP over SSL/TLS)zSSL/TLS Enabledtimeout   zConnection timeout in seconds   i,  Timeout	zone_namez8Zone identifier for FTP configuration (e.g., 2005, 2008)z	Zone Name)r   r   r   r   verification_numberz>Verification number for FTP configuration (e.g., 00001, 00002)zVerification Numberplatform_namez(Platform identifier (e.g., CJI, TDF, 2M)zPlatform Name	is_activez(Whether this FTP configuration is activez	Is ActivezStandalone FTP ConfigurationzStandalone FTP Configurationsstandalone_ftp_configurations)r   verbose_name_pluraldb_tableordering)r   fieldsoptionsStandaloneVPNConfigurationz.Human-readable name for this VPN configurationz.Optional description of this VPN configurationvpn_type)ipseczIPSec Tunnel)openvpnOpenVPN)	wireguard	WireGuardzType of VPN technology to use   zVPN Type)choicesr   r   r   server_addressz!VPN server IP address or hostnamezServer AddresszUsername for VPN authenticationzPassword for VPN authenticationipsec_preshared_keyz'Pre-shared key for IPSec authenticationzIPSec Pre-shared Keyipsec_local_subnetz%Local network subnet in CIDR notation   z<Enter a valid subnet in CIDR notation (e.g., 192.168.1.0/24)z^(\d{1,3}\.){3}\d{1,3}/\d{1,2}$)messageregexzLocal Subnet)r   r   r   r'   r   ipsec_remote_subnetz&Remote network subnet in CIDR notationz9Enter a valid subnet in CIDR notation (e.g., 10.0.0.0/24)zRemote Subnetipsec_encryption_algorithm)aes128zAES-128)aes192zAES-192)aes256zAES-256)3des3DESz%Encryption algorithm for IPSec tunnelzEncryption Algorithm)r   rB   r   r   r   openvpn_config_filez"OpenVPN configuration file (.ovpn)zvpn/openvpn/configs/zOpenVPN Config File)r   r   r   	upload_tor   openvpn_ca_certz)Certificate Authority certificate contentzCA Certificateopenvpn_client_certzClient certificate contentzClient Certificateopenvpn_client_keyzClient private key contentzClient Private Keyopenvpn_compressionz!Whether to enable LZO compressionzEnable Compressionwireguard_private_keyz&WireGuard private key (base64 encoded),   zPrivate Keywireguard_public_keyz%WireGuard public key (base64 encoded)z
Public Keywireguard_peer_public_keyz*WireGuard peer public key (base64 encoded)zPeer Public Keywireguard_endpointz-WireGuard endpoint (IP:port or hostname:port)Endpointwireguard_allowed_ipsz)Comma-separated list of allowed IP rangeszAllowed IPswireguard_persistent_keepalivez(Keepalive interval in seconds (optional)zPersistent Keepalive)r   r   r   r'   r   z(Whether this VPN configuration is activezStandalone VPN ConfigurationzStandalone VPN Configurationsstandalone_vpn_configurationsZoneFTPConfigurationz!Unique identifier for this object)r   r   r   r   r   
is_defaultz:Whether this is the default FTP configuration for the zonez
Is Defaultpriorityz0Priority level (higher number = higher priority)PriorityzZone FTP ConfigurationzZone FTP Configurationszone_ftp_configurationsz	-priority
zone__nameZoneVPNConfigurationz:Whether this is the default VPN configuration for the zonezZone VPN ConfigurationzZone VPN Configurationszone_vpn_configurationsjinglechannelz-created_atJingleJingles)r7   r   r5   )r   r9   jingles_priorit_65aa69_idx)
model_namer   video_fingerprintchannelzonerelationftp_platform_namezEName of the platform for FTP configuration example: CJI, TDF, 2M, etc)rl   r   fieldftp_verife_numberzDVerification number for FTP configuration example: 00001, 00002, etcftp_zone_namezEName of the zone for FTP configuration example: 2005, 2008, 2010, etc	file_sizezSize of the audio file in byteszFile Size (bytes)frames_fingerprintz:Frames fingerprint data for automatic detection in streamszFrames Fingerprintmd5_filez>MD5 checksum file (automatically generated after audio upload)zMD5 Checksum Filemetadataz@Additional audio metadata (bitrate, sample rate, channels, etc.)zAudio Metadata)r   r   r   r   zoneszTGeographic zones where this channel is available (can be added later during editing)r   zchannels.ChannelZoneRelationzchannels.channelzonezBroadcasting Zones)r   r   related_namethroughtor   ftp_hostz_FTP server hostname or IP address for content delivery (legacy - use standalone config instead)durationz!Duration of the jingle in secondszDuration (seconds)filezHAudio file for this jingle (automatically organized by channel and date)z
Audio File)r   rQ   r   jingle_type)
station_idz
Station ID)bumperBumper)promoPromo)
transition
Transition)commercial_breakzCommercial Break)
news_introz
News Intro)weather_introzWeather Intro)sports_introzSports Intro)music_introzMusic Intro)show_openerzShow Opener)show_closerzShow CloserzType of jingle contentzJingle Type)rB   db_indexr   r   r   placement_type)startzStart of Show)endzEnd of Show)commercial_startzStart of Commercial Break)commercial_endzEnd of Commercial Break)program_transitionzProgram Transition)segment_transitionzSegment Transition)hourlyHourly)half_hourlyzHalf Hourly)quarter_hourlyzQuarter Hourly)top_of_hourzTop of Hour)bottom_of_hourzBottom of Hour)randomzRandom Placement)manualzManual Onlyr   z2When this jingle should be played in the broadcastzPlacement Type)rB   r   r   r   r   r   )r%   zVery Low)   Low)   Normal)   High)r.   z	Very High)   Criticalr   zEPriority level for jingle selection (higher number = higher priority)zPriority Level)rB   r   r   r   jingledetectiondetection_method)audio_fingerprintzAudio Fingerprint)rt   zI-Frame Fingerprint)combinedzCombined Audio/Frame)r   zManual Detectionr   zMethod used for detection2   zDetection Method)rB   r   r   r   r   Zjingles_priorit_b81a38_idx)r8   r   )rl   index)duration__gter   positive_duration)checkr   )rl   
constraint)file_size__gter   positive_file_sizeZzonevpnconfiguration
created_byzUser who created this objectz%(class)s_createdz
Created By)r   r   r   	on_deleterx   rz   r   
deleted_byz!User who soft-deleted this objectz%(class)s_deletedz
Deleted By
updated_byz"User who last modified this objectz%(class)s_updatedz
Updated By
vpn_configz*The VPN configuration to use for this zonezone_assignmentsz#channels.standalonevpnconfigurationzVPN Configuration)r   r   rx   rz   r   zonez*The zone this VPN configuration applies tovpn_configurationsZoneZzoneftpconfiguration
ftp_configz*The FTP configuration to use for this zonez#channels.standaloneftpconfigurationzFTP Configurationz*The zone this FTP configuration applies toftp_configurationsZstandalonevpnconfigurationZstandaloneftpconfigurationstandalone_ftp_configzKReference to a standalone FTP configuration (overrides inline FTP settings)channel_zone_relationsstandalone_vpn_configzKReference to a standalone VPN configuration (overrides inline VPN settings)Zzone_vpn_co_zone_id_0b15de_idxZzone_vpn_co_priorit_2efb32_idx)r   r   )r   unique_togetherZzone_ftp_co_zone_id_f0cc55_idxZzone_ftp_co_priorit_c3639e_idx)r   r   Zstandalone__vpn_typ_08e367_idxZstandalone__name_f040aa_idxZstandalone__host_8571f6_idxZstandalone__name_98e0d1_idxZstandalone__is_acti_bcd70d_idxN)4__name__
__module____qualname__r   swappable_dependencyr   AUTH_USER_MODELdependenciesCreateModelr   DateTimeFieldBooleanField	UUIDFielduuiduuid4	CharField	TextFieldPositiveIntegerFielddjangocorer'   MinValueValidatorMaxValueValidatorRegexValidator	FileFieldAlterModelOptionsRemoveIndexRemoveFieldAddFieldPositiveBigIntegerFieldappsr   utilsmd5_upload_path	JSONFielddict
AlterFieldManyToManyFieldjingle_upload_pathPositiveSmallIntegerFieldAddIndexIndexAddConstraintCheckConstraintQ
ForeignKeydbdeletionSET_NULLCASCADEAlterUniqueTogether
operations r   r   \/var/www/html/Focus/src/apps/channels/migrations/0002_standaloneftpconfiguration_and_more.pyr      s  
,,&&.&

(>0,((($"(($("((((((&&  r   )apps.channels.utilsr   django.confr   Zdjango.core.validatorsr   	django.dbr   r   django.db.models.deletionr   r   r   r   r   r   <module>   s   