addBehavior( new SoftDelete([ 'field' => 'deleted', 'value' => 1, ]) ); } public function beforeCreate() { $this->create_time = time(); } public function beforeUpdate() { $this->update_time = time(); } public static function sizeTypes() { return [ '0' => '小号', '1' => '大号', ]; } public static function positionTypes() { return [ '0' => '滚动', '1' => '顶部', '2' => '底部', ]; } }