Files
2026-09-15 10:35:56 +08:00

28 lines
2.1 KiB
XML

<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="esun_video" resource="default" engine="innodb" comment="Esun Uploaded Videos">
<column xsi:type="int" name="video_id" unsigned="true" nullable="false" identity="true" comment="Video ID"/>
<column xsi:type="varchar" name="title" nullable="false" length="255" comment="Title"/>
<column xsi:type="text" name="description" nullable="true" comment="Description"/>
<column xsi:type="varchar" name="video_path" nullable="false" length="1024" comment="Media Relative Video Path"/>
<column xsi:type="varchar" name="cover_path" nullable="true" length="1024" comment="Media Relative Cover Path"/>
<column xsi:type="smallint" name="status" unsigned="true" nullable="false" default="1" comment="Status"/>
<column xsi:type="decimal" name="duration" scale="3" precision="12" nullable="false" default="0" comment="Duration Seconds"/>
<column xsi:type="bigint" name="size" unsigned="true" nullable="false" default="0" comment="File Size Bytes"/>
<column xsi:type="int" name="width" unsigned="true" nullable="false" default="0" comment="Width"/>
<column xsi:type="int" name="height" unsigned="true" nullable="false" default="0" comment="Height"/>
<column xsi:type="varchar" name="resolution" nullable="false" length="32" default="" comment="Resolution Label"/>
<column xsi:type="varchar" name="original_name" nullable="false" length="255" comment="Original File Name"/>
<column xsi:type="timestamp" name="created_at" nullable="false" default="CURRENT_TIMESTAMP" comment="Created At"/>
<column xsi:type="timestamp" name="updated_at" nullable="false" default="CURRENT_TIMESTAMP"
on_update="true" comment="Updated At"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="video_id"/>
</constraint>
<index referenceId="ESUN_VIDEO_STATUS" indexType="btree">
<column name="status"/>
</index>
</table>
</schema>