<?php
# 获取分类权限
$status = array
(
    1 => '使用中',
    2 => '停止使用',
    3 => '申请合作',
);

return array
(
    # 表名
    'name' => 'print',
    # 显示给用户看的名称
    'lang' => '打印设备',
    # 后台菜单排序
    'order' => 10,
    'menu' => false,
    # 数据结构
    'struct' => array
    (
        'id'        => array
        (
            'type'      => 'int-11',
            'name'      => 'ID',
            'default'   => '',
            'desc'      => '',
            'match'     => 'is_numeric',
            'search'    => 'order',
            'list'      => true,
            'order'     => 'desc',
        ),

        'shop_id'      => array
        (
            'type'      => 'int-11',
            'name'      => '所属门店',
            'default'   => '',
            'desc'      => '所属门店',
            'match'     => 'is_numeric',
            'update'    => 'hidden',
            'value'     => Dever::input('search_option_shop_id'),
            'list'      => 'Dever::load("shop/info-find#name", {shop_id})',
        ),
        
        'name'      => array
        (
            'type'      => 'varchar-200',
            'name'      => '设备名称',
            'default'   => '',
            'desc'      => '请输入设备名称',
            'match'     => 'is_string',
            'update'    => 'text',
            'search'    => 'fulltext',
            'list'      => true,
        ),

        'number'      => array
        (
            'type'      => 'varchar-100',
            'name'      => '打印机编号',
            'default'   => '',
            'desc'      => '打印机编号',
            'match'     => 'is_string',
            'update'    => 'text',
            'search'    => 'fulltext',
            'list'      => true,
        ),

        'status'        => array
        (
            'type'      => 'int-11',
            'name'      => '打印机状态',
            'default'   => '1',
            'desc'      => '打印机状态',
            'match'     => 'is_numeric',
            //'update'  => 'select',
            'option'    => $status,
            'search'    => 'select',
            'list'      => true,
            'edit'      => true,
        ),

        'state'     => array
        (
            'type'      => 'tinyint-1',
            'name'      => '状态',
            'default'   => '1',
            'desc'      => '请选择状态',
            'match'     => 'is_numeric',
        ),
        
        'cdate'     => array
        (
            'type'      => 'int-11',
            'name'      => '购买时间',
            'match'     => array('is_numeric', time()),
            'desc'      => '',
            # 只有insert时才生效
            'insert'    => true,
            'list'      => 'date("Y-m-d H:i:s", {cdate})',
        ),
    ),

    'manage' => array
    (
        
    ),

    'request' => array
    (
        
    ),
);