255], [['alias'], 'string', 'max' => 50], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'id', 'pid' => '父级id', 'name' => '名称', 'type' => '类型', 'own_type' => '拥有者类型', 'own_id' => '拥有者id', 'alias' => '别名', 'path' => '地址', 'is_delete' => '是否删除,1为已删除', 'updated_at' => '更新时间', 'created_at' => '创建时间', ]; } /** * @author linyao * @email 602604991@qq.com * @created Nov 8, 2019 * * 行为存储创建时间和更新时间 */ public function behaviors() { return [ [ 'class' => TimestampBehavior::className(), 'createdAtAttribute' => 'created_at', 'updatedAtAttribute' => 'updated_at', 'value' => function() { return time(); }, ], ]; } }