Files
ulthon_admin/app/admin/scheme/TreeTree.php
2026-03-26 20:22:34 +08:00

55 lines
2.0 KiB
PHP

<?php
namespace app\admin\scheme;
use app\common\scheme\BaseScheme;
use app\common\scheme\attribute\Table;
use app\common\scheme\attribute\Field;
use app\common\scheme\attribute\Component;
use app\common\scheme\attribute\Index;
#[Table(name: 'ul_tree_tree', comment: '')]
#[Index(columns: ['path'], name: 'ul_tree_tree_path_IDX', type: 'NORMAL')]
#[Index(columns: ['pid'], name: 'ul_tree_tree_pid_IDX', type: 'NORMAL')]
#[Index(columns: ['title'], name: 'ul_tree_tree_title_IDX', type: 'NORMAL')]
class TreeTree extends BaseScheme
{
#[Field(type: 'int', length: 11, nullable: false, comment: 'ID', autoIncrement: true, primary: true)]
public $id;
#[Field(length: 255, precision: 255, nullable: false, default: '', comment: '分类名称')]
#[Component(type: 'text', options: [])]
public $title;
#[Field(type: 'int', length: 11, comment: '父级ID')]
public $pid;
#[Field(type: 'int', length: 11, nullable: false, default: '1', comment: '分类层级')]
public $level;
#[Field(length: 255, precision: 255, nullable: false, comment: '分类路径')]
public $path;
#[Field(length: 50, precision: 50, nullable: false, default: 'default', comment: '类型')]
public $type;
#[Field(type: 'tinyint', length: 11, nullable: false, default: '1', comment: '状态')]
#[Component(type: 'switch', options: ['禁用', '启用'])]
public $status;
#[Field(length: 255, precision: 255, default: '', comment: '分类图片')]
#[Component(type: 'image', options: [])]
public $image;
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '创建时间', unsigned: true)]
public $create_time;
#[Field(type: 'int', length: 11, nullable: false, default: '0', comment: '更新时间', unsigned: true)]
public $update_time;
#[Field(length: 100, precision: 100, comment: '备注')]
public $comment;
#[Field(type: 'int', length: 11, default: '0', unsigned: true)]
public $delete_time;
}